Hemg commited on
Commit
b1447bf
·
verified ·
1 Parent(s): 731a070

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1,9 +1,16 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
- p = pipeline("automatic-speech-recognition")
 
 
 
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 + " "