Hi there,
my name is Julien, new to Bubble but not so new to No-Code (experienced MIT App inventor).
I am also struggling with sending a file to an API in Bubble.
The mentionned API is :
import requests
API_URL = “https://api-inference.huggingface.co/models/speechbrain/asr-wav2vec2-commonvoice-fr”
headers = {“Authorization”: “Bearer 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”}
def query(filename):
with open(filename, “rb”) as f:
data = f.read()
response = requests.request(“POST”, API_URL, headers=headers, data=data)
return json.loads(response.content.decode(“utf-8”))
output = query(“sample1.flac”)
: I guess I have to convert my file to UTF8 using @aaronsheldon plugin.
Let’s try, even if not so much coding experience…