Spaces:
Runtime error
Runtime error
Upload 3 files
Browse files- README.md +5 -4
- app.py +18 -0
- requirements.txt +4 -0
README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
---
|
2 |
-
title: Swedish
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.12.0
|
8 |
app_file: app.py
|
@@ -11,3 +11,4 @@ license: apache-2.0
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
1 |
---
|
2 |
+
title: Whisper Swedish Audio Text
|
3 |
+
emoji: ⚡
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: red
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.12.0
|
8 |
app_file: app.py
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
|
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
pipe = pipeline(model="torileatherman/train_first_try") # change to "your-username/the-name-you-picked"
|
5 |
+
|
6 |
+
def transcribe(audio):
|
7 |
+
text = pipe(audio)["text"]
|
8 |
+
return text
|
9 |
+
|
10 |
+
iface = gr.Interface(
|
11 |
+
fn=transcribe,
|
12 |
+
inputs=gr.Audio(source="microphone", type="filepath"),
|
13 |
+
outputs="text",
|
14 |
+
title="Whisper Small Swedish",
|
15 |
+
description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
|
16 |
+
)
|
17 |
+
|
18 |
+
iface.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
numpy
|
3 |
+
transformers
|
4 |
+
gradio
|