Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,16 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
def transcribe(audio, state=""):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
""" Speech to text function using pipeline"""
|
| 8 |
text = p(audio)["text"]
|
| 9 |
state += text + " "
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
modelName = "Melanoma-Cancer-Image-Classification"
|
| 5 |
+
hfUser = "Hemg"
|
| 6 |
+
|
| 7 |
+
|
| 8 |
|
| 9 |
def transcribe(audio, state=""):
|
| 10 |
+
|
| 11 |
+
modelPath = hfUser + "/" + modelName
|
| 12 |
+
|
| 13 |
+
p = pipeline("automatic-speech-recognition", model=modelPath)
|
| 14 |
""" Speech to text function using pipeline"""
|
| 15 |
text = p(audio)["text"]
|
| 16 |
state += text + " "
|