weilikai01 commited on
Commit
384f3d6
1 Parent(s): 2f9ae80

modify app.py, set type=filepath

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -10,13 +10,8 @@ def asr(test_file):
10
  def gradio_asr(test_file):
11
  return asr(test_file)
12
 
13
- asr_upload = gr.Interface(fn=gradio_asr,
14
- inputs=gr.Audio(source='upload', type='filepath'),
15
- outputs='text')
16
-
17
  app_mic = gr.Interface(fn=gradio_asr,
18
- inputs=gr.Audio(source='microphone', type='filepath'),
19
  outputs='text')
20
 
21
- app = gr.TabbedInterface([asr_upload, app_mic], ["语音文件", "实时识别"])
22
- app.launch(server_name='0.0.0.0', ssl_verify=False)
 
10
  def gradio_asr(test_file):
11
  return asr(test_file)
12
 
 
 
 
 
13
  app_mic = gr.Interface(fn=gradio_asr,
14
+ inputs=gr.Audio(type='filepath'),
15
  outputs='text')
16
 
17
+ app_mic.launch(server_name='0.0.0.0', ssl_verify=False)