Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
398 |
-
|
399 |
WHISPER_headers = { "Authorization": "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","Content-Type": "audio/wav" }
|
400 |
-
response = requests.post(
|
|
|
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):
|