Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,16 +1,19 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
| 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
|
| 14 |
)
|
| 15 |
-
|
| 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()
|