freeja commited on
Commit
6d34c3a
1 Parent(s): 51af9a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -14
app.py CHANGED
@@ -38,25 +38,14 @@ def transcribe_video(URL):
38
  text = pipe(yt)["text"]
39
  return text
40
 
41
- youtube_func = gr.Interface(
42
- fn = transcribe_video,
43
- inputs = "text",
44
- outputs = "text",
45
- title = "Whisper Small Swedish",
46
- description = "Realtime demo for Swedish speech recognition with translation using a fine-tuned Whisper small model",
47
- )
48
-
49
- transcribe_func = gr.Interface(
50
- fn=transcribe_audio,
51
  inputs=[
52
  gr.Audio(source="microphone", type="filepath", label="Transcribe from Microphone"),
53
  gr.Dropdown(["English","Spanish","Dutch","French","Italian"], value="English", label="Translate to ")
54
  ],
55
  outputs="text",
56
  title="Whisper Small Swedish",
57
- description="Realtime demo for Swedish speech recognition with translation using a fine-tuned Whisper small model",
58
-
59
-
60
- iface = gr.TabbedInterface([transcribe_func, youtube_func], ["Audio to Text","Video transciption"])
61
 
62
  iface.launch()
 
38
  text = pipe(yt)["text"]
39
  return text
40
 
41
+ iface = gr.Interface(
42
+ fn=transcribe_audio,
 
 
 
 
 
 
 
 
43
  inputs=[
44
  gr.Audio(source="microphone", type="filepath", label="Transcribe from Microphone"),
45
  gr.Dropdown(["English","Spanish","Dutch","French","Italian"], value="English", label="Translate to ")
46
  ],
47
  outputs="text",
48
  title="Whisper Small Swedish",
49
+ description="Realtime demo for Swedish speech recognition with translation using a fine-tuned Whisper small model")
 
 
 
50
 
51
  iface.launch()