CsanadT commited on
Commit
440a6b6
1 Parent(s): a062548

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -15,11 +15,6 @@ def transcribe_url(url):
15
  text = pipe(audio)["text"]
16
  return text
17
 
18
- def transcribe_file(audio):
19
- rate, y = audio
20
- text = pipe(y)["text"]
21
- return text
22
-
23
  url_demo = gr.Interface(
24
  fn = transcribe_url,
25
  inputs = "text",
@@ -36,13 +31,6 @@ voice_demo = gr.Interface(
36
  description="Live transcription of swedish speech via a fine-tuned Whisper model",
37
  )
38
 
39
- file_demo = gr.Interface(
40
- fn = transcribe_file,
41
- inputs=gr.Audio(file_count="single"),
42
- outputs="text",
43
- title="Swedish Whisper",
44
- description="Transciption of a swedish audio file via a fine-tuned Whisper model",
45
- )
46
- demo = gr.TabbedInterface([url_demo, voice_demo, file_demo], ["YouTube video transciption", "Live audio to Text", "Transcribe a file"])
47
 
48
  demo.launch()
 
15
  text = pipe(audio)["text"]
16
  return text
17
 
 
 
 
 
 
18
  url_demo = gr.Interface(
19
  fn = transcribe_url,
20
  inputs = "text",
 
31
  description="Live transcription of swedish speech via a fine-tuned Whisper model",
32
  )
33
 
34
+ demo = gr.TabbedInterface([url_demo, voice_demo], ["YouTube video transciption", "Live audio to Text"])
 
 
 
 
 
 
 
35
 
36
  demo.launch()