thanhtvt commited on
Commit
ea4793c
1 Parent(s): def7896

return url link

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -248,17 +248,17 @@ with demo:
248
  fn=process_microphone,
249
  )
250
 
251
- # with gr.TabItem("From URL"):
252
- # url_textbox = gr.Textbox(
253
- # max_lines=1,
254
- # placeholder="URL to an audio file",
255
- # label="URL",
256
- # interactive=True,
257
- # )
258
-
259
- # url_button = gr.Button("Submit for recognition")
260
- # url_output = gr.Textbox(label="Recognized speech from URL")
261
- # url_html_info = gr.HTML(label="Info")
262
 
263
  upload_button.click(
264
  process_uploaded_file,
@@ -282,16 +282,16 @@ with demo:
282
  outputs=[recorded_output, recorded_html_info],
283
  )
284
 
285
- # url_button.click(
286
- # process_url,
287
- # inputs=[
288
- # url_textbox,
289
- # decode_method_radio,
290
- # beam_size_slider,
291
- # max_symbols_per_step_slider,
292
- # ],
293
- # outputs=[url_output, url_html_info],
294
- # )
295
  gr.Markdown(description)
296
 
297
 
 
248
  fn=process_microphone,
249
  )
250
 
251
+ with gr.TabItem("From URL"):
252
+ url_textbox = gr.Textbox(
253
+ max_lines=1,
254
+ placeholder="URL to an audio file",
255
+ label="URL",
256
+ interactive=True,
257
+ )
258
+
259
+ url_button = gr.Button("Submit for recognition")
260
+ url_output = gr.Textbox(label="Recognized speech from URL")
261
+ url_html_info = gr.HTML(label="Info")
262
 
263
  upload_button.click(
264
  process_uploaded_file,
 
282
  outputs=[recorded_output, recorded_html_info],
283
  )
284
 
285
+ url_button.click(
286
+ process_url,
287
+ inputs=[
288
+ url_textbox,
289
+ decode_method_radio,
290
+ beam_size_slider,
291
+ max_symbols_per_step_slider,
292
+ ],
293
+ outputs=[url_output, url_html_info],
294
+ )
295
  gr.Markdown(description)
296
 
297