Spaces:
Runtime error
Runtime error
save
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import streamlit as st
|
|
8 |
|
9 |
|
10 |
|
|
|
11 |
|
12 |
app = Flask(__name__)
|
13 |
|
@@ -22,10 +23,10 @@ def runApi():
|
|
22 |
modelSelection = request.form.get("model")
|
23 |
print(audio_url)
|
24 |
|
25 |
-
if (modelSelection == None):
|
26 |
-
|
27 |
-
model = whisper.load_model(modelSelection)
|
28 |
-
print(model)
|
29 |
|
30 |
# # reject if key not the same
|
31 |
# apiKey = st.secrets["Api-Key"]
|
@@ -55,7 +56,7 @@ def runApi():
|
|
55 |
return jsonify({
|
56 |
"audio_url": audio_url,
|
57 |
"model": model,
|
58 |
-
"result": result
|
59 |
})
|
60 |
|
61 |
if __name__ == "__main__":
|
|
|
8 |
|
9 |
|
10 |
|
11 |
+
model = whisper.load_model('small')
|
12 |
|
13 |
app = Flask(__name__)
|
14 |
|
|
|
23 |
modelSelection = request.form.get("model")
|
24 |
print(audio_url)
|
25 |
|
26 |
+
# if (modelSelection == None):
|
27 |
+
# modelSelection = "small"
|
28 |
+
# model = whisper.load_model(modelSelection)
|
29 |
+
# print(model)
|
30 |
|
31 |
# # reject if key not the same
|
32 |
# apiKey = st.secrets["Api-Key"]
|
|
|
56 |
return jsonify({
|
57 |
"audio_url": audio_url,
|
58 |
"model": model,
|
59 |
+
"result": result,
|
60 |
})
|
61 |
|
62 |
if __name__ == "__main__":
|