Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,9 +6,9 @@ API_URL = "http://8.213.40.255/transcribe"
|
|
| 6 |
|
| 7 |
def process_audio(audio_file):
|
| 8 |
try:
|
| 9 |
-
# Send the audio file to your API
|
| 10 |
with open(audio_file, "rb") as f:
|
| 11 |
-
files = {"
|
| 12 |
response = requests.post(API_URL, files=files)
|
| 13 |
|
| 14 |
if response.status_code == 200:
|
|
|
|
| 6 |
|
| 7 |
def process_audio(audio_file):
|
| 8 |
try:
|
| 9 |
+
# Send the audio file to your API with the correct field name
|
| 10 |
with open(audio_file, "rb") as f:
|
| 11 |
+
files = {"audio_file": f} # <-- key changed to match your API spec
|
| 12 |
response = requests.post(API_URL, files=files)
|
| 13 |
|
| 14 |
if response.status_code == 200:
|