baaabaei commited on
Commit
9deb4c6
·
verified ·
1 Parent(s): 1acda07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -1,16 +1,19 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- pipe = pipeline(model="baaabaei/whisper-fa") # change to "your-username/the-name-you-picked"
 
 
5
  def transcribe(audio):
6
  text = pipe(audio)["text"]
7
  return text
 
8
  iface = gr.Interface(
9
  fn=transcribe,
10
  inputs=gr.Audio(source="microphone", type="filepath"),
11
  outputs="text",
12
  title="Whisper Small Persian",
13
- description="Realtime demo for persian speech recognition using a fine-tuned Whisper small model.",
14
  )
15
- iface.launch()"
16
-
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ # Update this to your actual model name
5
+ pipe = pipeline(model="baaabaei/whisper-fa")
6
+
7
  def transcribe(audio):
8
  text = pipe(audio)["text"]
9
  return text
10
+
11
  iface = gr.Interface(
12
  fn=transcribe,
13
  inputs=gr.Audio(source="microphone", type="filepath"),
14
  outputs="text",
15
  title="Whisper Small Persian",
16
+ description="Realtime demo for Persian speech recognition using a fine-tuned Whisper small model.",
17
  )
18
+
19
+ iface.launch()