ayberkuckun commited on
Commit
e554ec1
1 Parent(s): 0985697
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -32,17 +32,19 @@ def transcribe(url):
32
 
33
  output = pipe(speech_array)
34
 
35
- return output["text"]
36
 
37
 
38
  iface = gr.Interface(
39
  fn=transcribe,
40
  inputs=gr.Textbox("https://www.youtube.com/watch?v=n9g12Xm9UJM", label="Paste a YouTube video URL"),
41
- outputs=[gr.Textbox(label="Transcription")],
 
 
 
42
  title="Whisper Small Swedish",
43
  description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
44
  allow_flagging="never"
45
  )
46
 
47
  iface.launch()
48
- # gr.Image("latest_titanic.png", label="Model Scores")
 
32
 
33
  output = pipe(speech_array)
34
 
35
+ return "audio.mp3", output["text"], "latest_titanic.png"
36
 
37
 
38
  iface = gr.Interface(
39
  fn=transcribe,
40
  inputs=gr.Textbox("https://www.youtube.com/watch?v=n9g12Xm9UJM", label="Paste a YouTube video URL"),
41
+ outputs=[gr.Audio(label="Transcripted Audio"),
42
+ gr.Textbox(label="Transcription"),
43
+ gr.Image(label="Model Scores")
44
+ ],
45
  title="Whisper Small Swedish",
46
  description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
47
  allow_flagging="never"
48
  )
49
 
50
  iface.launch()