antonbol commited on
Commit
4db7dc5
·
1 Parent(s): e5e53c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
- from os import listdir
4
  import glob
5
  pipe = pipeline(model="fimster/whisper-small-sv-SE") # change to "your-username/the-name-you-picked"
6
-
 
7
 
8
  def transcribe(audio):
9
  text = pipe(audio)["text"]
@@ -12,9 +12,12 @@ def transcribe(audio):
12
  iface = gr.Interface(
13
  fn=transcribe,
14
  inputs=gr.Audio(source="microphone", type="filepath"),
 
 
15
  outputs="text",
16
  title="Whisper Small Swedish",
17
  description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
18
  )
19
 
 
20
  iface.launch()
 
1
  from transformers import pipeline
2
  import gradio as gr
 
3
  import glob
4
  pipe = pipeline(model="fimster/whisper-small-sv-SE") # change to "your-username/the-name-you-picked"
5
+ images = ["katt", "melon", "hund", "banan"]
6
+ print(glob.glob("./images/"))
7
 
8
  def transcribe(audio):
9
  text = pipe(audio)["text"]
 
12
  iface = gr.Interface(
13
  fn=transcribe,
14
  inputs=gr.Audio(source="microphone", type="filepath"),
15
+ # image =
16
+ # image = gr.Image(),
17
  outputs="text",
18
  title="Whisper Small Swedish",
19
  description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
20
  )
21
 
22
+
23
  iface.launch()