github-actions[bot] commited on
Commit
5d20e7d
·
1 Parent(s): c318bd7

Sync with https://github.com/mozilla-ai/speech-to-text-finetune

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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 "️️⚠️ Please select or fill at least and only one of the options above"
 
 
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