paulbauriegel commited on
Commit
a375331
1 Parent(s): 67cfc3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -14,6 +14,10 @@ def speech_to_text(mic=None, file=None, lang=None):
14
  audio = file
15
  else:
16
  raise gr.Error("You must either provide a mic recording or a file")
 
 
 
 
17
  task = 'transcribe' if lang is None else 'translate'
18
  print(lang, task)
19
 
 
14
  audio = file
15
  else:
16
  raise gr.Error("You must either provide a mic recording or a file")
17
+
18
+ if lang is None or lang == '':
19
+ lang = None
20
+
21
  task = 'transcribe' if lang is None else 'translate'
22
  print(lang, task)
23