s03f3ff commited on
Commit
b8516d6
·
verified ·
1 Parent(s): b940808

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
 
 
4
  pipe = pipeline("automatic-speech-recognition", model="jonatasgrosman/wav2vec2-large-xlsr-53-english")
5
 
6
  pipe2 = pipeline("summarization", model="facebook/bart-large-cnn")
@@ -27,4 +29,12 @@ file_transcribe = gr.Interface(
27
  allow_flagging="never",
28
  )
29
 
30
- iface.launch()
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ demo = gr.Blocks()
5
+
6
  pipe = pipeline("automatic-speech-recognition", model="jonatasgrosman/wav2vec2-large-xlsr-53-english")
7
 
8
  pipe2 = pipeline("summarization", model="facebook/bart-large-cnn")
 
29
  allow_flagging="never",
30
  )
31
 
32
+ with demo:
33
+ gr.TabbedInterface(
34
+ [mic_transcribe,
35
+ file_transcribe],
36
+ ["Transcribe Microphone",
37
+ "Transcribe Audio File"],
38
+ )
39
+ demo.launch(share=True,
40
+ server_port=int(os.environ['PORT1']))