FarhadMadadzade
commited on
Commit
·
fac06d0
1
Parent(s):
46b2a81
added test gradio app
Browse files- README.md +5 -5
- app.py +20 -0
- requirements.txt +4 -0
README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
|
|
1 |
---
|
2 |
+
title: Iris
|
3 |
+
emoji: 🐢
|
4 |
+
colorFrom: purple
|
5 |
+
colorTo: green
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.5
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
app.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
import time
|
4 |
+
|
5 |
+
pipe = pipeline("automatic-speech-recognition", model="Artanis1551/whisper_romanian3")
|
6 |
+
|
7 |
+
|
8 |
+
def transcribe(audio, state=""):
|
9 |
+
text = pipe(audio)["text"]
|
10 |
+
state += text + " "
|
11 |
+
return state, state
|
12 |
+
|
13 |
+
|
14 |
+
gr.Interface(
|
15 |
+
title="Romanian Speech Transcription",
|
16 |
+
fn=transcribe,
|
17 |
+
inputs=[gr.Audio(source="microphone", type="filepath", streaming=True), "state"],
|
18 |
+
outputs=["textbox", "state"],
|
19 |
+
live=True,
|
20 |
+
).launch()
|
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
hopsworks
|
2 |
+
joblib
|
3 |
+
scikit-learn==1.1.1
|
4 |
+
httpx==0.24.1
|