Valdimarb13 commited on
Commit
e46128d
1 Parent(s): e75c9d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -23,9 +23,9 @@ def get_audio(url):
23
  return a
24
 
25
 
26
- def transcribe_youtube(url):
27
- result = pipe(get_audio(url))["text"]
28
- return result['text']
29
 
30
 
31
  with gr.Blocks() as demo:
@@ -41,7 +41,7 @@ with gr.Blocks() as demo:
41
  speech_button = gr.Button("Submit")
42
 
43
 
44
- youtube_button.click(transcribe_youtube, inputs = input_text, outputs = output_text)
45
  speech_button.click(transcribe, inputs = input_speech, outputs = output_speech)
46
 
47
  demo.launch()
 
23
  return a
24
 
25
 
26
+ def get_text(url):
27
+ text = pipe(get_audio(url))["text"]
28
+ return text
29
 
30
 
31
  with gr.Blocks() as demo:
 
41
  speech_button = gr.Button("Submit")
42
 
43
 
44
+ youtube_button.click(get_text, inputs = input_text, outputs = output_text)
45
  speech_button.click(transcribe, inputs = input_speech, outputs = output_speech)
46
 
47
  demo.launch()