eengel7 commited on
Commit
92d58b3
1 Parent(s): 2f73628

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +5 -4
  2. app.py +18 -0
  3. requirements.txt +4 -0
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: Swedish Survival Kit
3
- emoji: 📉
4
- colorFrom: pink
5
- colorTo: green
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