yuangongfdu commited on
Commit
37a446d
1 Parent(s): 838e208

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,7 +20,7 @@ def upload_audio(audio_path):
20
  if size == True:
21
  return 'size'
22
  with open(audio_path, 'rb') as audio_file:
23
- response = requests.post('http://sls-sm-14.csail.mit.edu:8080/upload/', files={'audio_file': audio_file})
24
  if response.status_code == 200:
25
  return response.json()["path"]
26
  except:
@@ -52,7 +52,7 @@ def predict(audio_path_m, audio_path_t, question, model):
52
  if question == '':
53
  return 'Please ask a question.'
54
  print(audio_path, question)
55
- response = requests.put('http://sls-sm-14.csail.mit.edu:8080/items/0', json={
56
  'audio_path': audio_path, 'question': question
57
  })
58
  answer_7b = json.loads(response.content)
 
20
  if size == True:
21
  return 'size'
22
  with open(audio_path, 'rb') as audio_file:
23
+ response = requests.post('http://sls-titan-5.csail.mit.edu:8080/upload/', files={'audio_file': audio_file})
24
  if response.status_code == 200:
25
  return response.json()["path"]
26
  except:
 
52
  if question == '':
53
  return 'Please ask a question.'
54
  print(audio_path, question)
55
+ response = requests.put('http://sls-titan-5.csail.mit.edu:8080/items/0', json={
56
  'audio_path': audio_path, 'question': question
57
  })
58
  answer_7b = json.loads(response.content)