Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,18 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
demo = gr.Blocks()
|
4 |
|
5 |
mic_transcribe = gr.Interface(
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def transcribe_speech(filepath):
|
4 |
+
output = pipe(
|
5 |
+
filepath,
|
6 |
+
max_new_tokens=256,
|
7 |
+
generate_kwargs={
|
8 |
+
"task": "transcribe",
|
9 |
+
"language": "sinhalese",
|
10 |
+
}, # update with the language you've fine-tuned on
|
11 |
+
chunk_length_s=30,
|
12 |
+
batch_size=8,
|
13 |
+
)
|
14 |
+
return output["text"]
|
15 |
+
|
16 |
demo = gr.Blocks()
|
17 |
|
18 |
mic_transcribe = gr.Interface(
|