101Frost commited on
Commit
dd7eac8
·
verified ·
1 Parent(s): 223e341

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = {"file": f}
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: