ihanif commited on
Commit
1912ca7
1 Parent(s): e1ddc09

Remove mic and file input warning

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -20,13 +20,14 @@ pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(lan
20
 
21
  def transcribe(microphone, file_upload):
22
  warn_output = ""
23
- if (microphone is not None) and (file_upload is not None):
24
- warn_output = (
25
- "WARNING: You've uploaded an audio file and used the microphone. "
26
- "The recorded file from the microphone will be used and the uploaded audio will be discarded.\n"
27
- )
28
-
29
- elif (microphone is None) and (file_upload is None):
 
30
  return "ERROR: You have to either use the microphone or upload an audio file"
31
 
32
  file = microphone if microphone is not None else file_upload
@@ -58,7 +59,7 @@ def yt_transcribe(yt_url):
58
 
59
  demo = gr.Blocks()
60
 
61
- examples=[['', "example-1.wav"]]
62
 
63
  mf_transcribe = gr.Interface(
64
  fn=transcribe,
 
20
 
21
  def transcribe(microphone, file_upload):
22
  warn_output = ""
23
+ #if (microphone is not None) and (file_upload is not None):
24
+ #warn_output = (
25
+ # "WARNING: You've uploaded an audio file and used the microphone. "
26
+ # "The recorded file from the microphone will be used and the uploaded audio will be discarded.\n"
27
+ #)
28
+
29
+ #elif (microphone is None) and (file_upload is None):
30
+ if (microphone is None) and (file_upload is None):
31
  return "ERROR: You have to either use the microphone or upload an audio file"
32
 
33
  file = microphone if microphone is not None else file_upload
 
59
 
60
  demo = gr.Blocks()
61
 
62
+ examples=[["example-1.wav", "example-2.wav"]]
63
 
64
  mf_transcribe = gr.Interface(
65
  fn=transcribe,