mollycarroll commited on
Commit
f1266ab
Β·
1 Parent(s): 6b48de9

first commit, set up all

Browse files
Files changed (4) hide show
  1. .gitignore +2 -0
  2. README.md +5 -4
  3. app.py +19 -0
  4. requirements.txt +1 -0
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ .env
2
+ .space_venv/
README.md CHANGED
@@ -1,9 +1,10 @@
1
  ---
2
- title: Asr Gradio
3
- emoji: πŸš€
4
- colorFrom: red
5
- colorTo: blue
6
  sdk: gradio
 
7
  sdk_version: 5.0.2
8
  app_file: app.py
9
  pinned: false
 
1
  ---
2
+ title: ASR Gradio
3
+ emoji: πŸ“
4
+ colorFrom: pink
5
+ colorTo: green
6
  sdk: gradio
7
+ python_version: 3.12
8
  sdk_version: 5.0.2
9
  app_file: app.py
10
  pinned: false
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-small")
5
+
6
+
7
+ def process_input(audio):
8
+ transcription = pipe(audio)["text"]
9
+ return transcription
10
+
11
+
12
+ interface = gr.Interface(
13
+ fn=process_input,
14
+ inputs=gr.Audio(sources=["microphone", "upload"], type="filepath"),
15
+ outputs="text",
16
+ title="testing for data aug",
17
+ )
18
+
19
+ interface.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ transformers