Spaces:
Running
on
Zero
Running
on
Zero
github-actions[bot]
commited on
Commit
·
5d20e7d
1
Parent(s):
c318bd7
Sync with https://github.com/mozilla-ai/speech-to-text-finetune
Browse files
app.py
CHANGED
@@ -66,10 +66,12 @@ def transcribe(
|
|
66 |
elif local_model_id and not hf_model_id and not dropdown_model_id:
|
67 |
pipe = _load_local_model(local_model_id)
|
68 |
else:
|
69 |
-
return
|
|
|
|
|
70 |
if isinstance(pipe, str):
|
71 |
-
# Exception raised
|
72 |
-
return pipe
|
73 |
text = pipe(audio)["text"]
|
74 |
return text
|
75 |
|
|
|
66 |
elif local_model_id and not hf_model_id and not dropdown_model_id:
|
67 |
pipe = _load_local_model(local_model_id)
|
68 |
else:
|
69 |
+
return (
|
70 |
+
"⚠️ Error: Please select or fill at least and only one of the options above"
|
71 |
+
)
|
72 |
if isinstance(pipe, str):
|
73 |
+
# Exception raised when loading
|
74 |
+
return f"⚠️ Error: {pipe}"
|
75 |
text = pipe(audio)["text"]
|
76 |
return text
|
77 |
|