Spaces:
Runtime error
Runtime error
zeon8985army
commited on
Commit
•
51e5e98
1
Parent(s):
5dedc91
Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,13 @@ import time
|
|
4 |
import requests
|
5 |
|
6 |
list_stack=[]
|
7 |
-
api_url="http://90f6-34-16-143-189.ngrok-free.app/upload"
|
8 |
|
9 |
def get_transcription_whissper_api(audio,api_url=api_url):
|
10 |
audio_file = open(audio, 'rb')
|
11 |
files = {'audio': ('audio.wav', audio_file)}
|
12 |
|
13 |
-
response = requests.post(
|
14 |
json_response = response.json()
|
15 |
|
16 |
if response.status_code == 200:
|
|
|
4 |
import requests
|
5 |
|
6 |
list_stack=[]
|
7 |
+
api_url="'http://90f6-34-16-143-189.ngrok-free.app/upload'"
|
8 |
|
9 |
def get_transcription_whissper_api(audio,api_url=api_url):
|
10 |
audio_file = open(audio, 'rb')
|
11 |
files = {'audio': ('audio.wav', audio_file)}
|
12 |
|
13 |
+
response = requests.post(api_url, files=files)
|
14 |
json_response = response.json()
|
15 |
|
16 |
if response.status_code == 200:
|