amrelshall commited on
Commit
83af583
1 Parent(s): 3807e84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,7 +9,7 @@ demo = gr.Blocks()
9
  # now ho to make the demo take long time audio
10
  def transcribe_long_form(filepath):
11
  if filepath is None:
12
- gr.Warning("No audio found, please retry.")
13
  return ""
14
  output = asr(
15
  filepath,
@@ -23,7 +23,7 @@ mic_transcribe = gr.Interface(
23
  fn=transcribe_long_form,
24
  inputs=gr.Audio(sources="microphone",
25
  type="filepath"),
26
- outputs=gr.Textbox(label="Transcription",
27
  lines=3),
28
  allow_flagging="never")
29
 
@@ -31,7 +31,7 @@ file_transcribe = gr.Interface(
31
  fn=transcribe_long_form,
32
  inputs=gr.Audio(sources="upload",
33
  type="filepath"),
34
- outputs=gr.Textbox(label="Transcription",
35
  lines=3),
36
  allow_flagging="never",
37
  )
@@ -43,4 +43,4 @@ with demo:
43
  ["Transcribe Microphone",
44
  "Transcribe Audio File"])
45
 
46
- demo.launch()
 
9
  # now ho to make the demo take long time audio
10
  def transcribe_long_form(filepath):
11
  if filepath is None:
12
+ gr.Warning("No audio found, please submit or record again")
13
  return ""
14
  output = asr(
15
  filepath,
 
23
  fn=transcribe_long_form,
24
  inputs=gr.Audio(sources="microphone",
25
  type="filepath"),
26
+ outputs=gr.Textbox(label="The record lyrics",
27
  lines=3),
28
  allow_flagging="never")
29
 
 
31
  fn=transcribe_long_form,
32
  inputs=gr.Audio(sources="upload",
33
  type="filepath"),
34
+ outputs=gr.Textbox(label="The record lyrics",
35
  lines=3),
36
  allow_flagging="never",
37
  )
 
43
  ["Transcribe Microphone",
44
  "Transcribe Audio File"])
45
 
46
+ demo.launch(share=True)