awacke1 commited on
Commit
71ee616
1 Parent(s): 0d2be5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -391,13 +391,14 @@ def whisper(filename):
391
  try:
392
  with open(filename, "rb") as f:
393
  data = f.read
394
- st.write(data)
395
  except:
396
  st.write(f'Could not open or read {filename}')
397
- #try:
398
- WHISPER_API_URL = 'https://tonpixzfvq3791u9.us-east-1.aws.endpoints.huggingface.cloud'
399
  WHISPER_headers = { "Authorization": "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","Content-Type": "audio/wav" }
400
- response = requests.post(WHISPER_API_URL, headers=WHISPER_headers, data=data)
 
401
  return response.json()
402
 
403
  def whisper_generate_filename(prompt, file_type):
 
391
  try:
392
  with open(filename, "rb") as f:
393
  data = f.read
394
+ #st.write(data)
395
  except:
396
  st.write(f'Could not open or read {filename}')
397
+
398
+
399
  WHISPER_headers = { "Authorization": "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","Content-Type": "audio/wav" }
400
+ response = requests.post('https://tonpixzfvq3791u9.us-east-1.aws.endpoints.huggingface.cloud', headers=WHISPER_headers, data=data)
401
+ st.write(response)
402
  return response.json()
403
 
404
  def whisper_generate_filename(prompt, file_type):