juulaii commited on
Commit
f794f86
1 Parent(s): e60af68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -2,16 +2,10 @@ import gradio as gr
2
 
3
  #Get models
4
  #ASR model for input speech
5
- from transformers import pipeline
6
-
7
- pipe = pipeline(task="automatic-speech-recognition",
8
- model="facebook/hubert-large-ls960-ft")
9
- speech2text = gr.Interface.from_pipeline(pipe,
10
- inputs=gr.inputs.Audio(label="Record Audio", type="file", source = "microphone"))
11
- #speech2text = gr.Interface.load("huggingface/facebook/hubert-large-ls960-ft",
12
- # inputs=gr.inputs.Audio(label="Record Audio", type="file", source = "microphone"))
13
 
14
- #translates english to spanish text
15
  translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-es",
16
  outputs=gr.outputs.Textbox(label="English to Spanish Translated Text"))
17
  #TTS model for output speech
 
2
 
3
  #Get models
4
  #ASR model for input speech
5
+ speech2text = gr.Interface.load("huggingface/facebook/hubert-large-ls960-ft",
6
+ inputs=gr.inputs.Audio(label="Record Audio", type="file", source = "microphone"))
 
 
 
 
 
 
7
 
8
+ #translates English to Spanish text
9
  translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-es",
10
  outputs=gr.outputs.Textbox(label="English to Spanish Translated Text"))
11
  #TTS model for output speech