Spaces:
Runtime error
Runtime error
Pavankalyan
commited on
Commit
·
e5d627d
1
Parent(s):
17f3c05
Update app.py
Browse files
app.py
CHANGED
@@ -34,11 +34,13 @@ from transformers import pipeline
|
|
34 |
p = pipeline(model="openai/whisper-medium")
|
35 |
|
36 |
def transcribe(text,audio):
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
42 |
return ans
|
43 |
|
44 |
|
|
|
34 |
p = pipeline(model="openai/whisper-medium")
|
35 |
|
36 |
def transcribe(text,audio):
|
37 |
+
if audio:
|
38 |
+
t = p(audio)['text']
|
39 |
+
ans = predict(t)
|
40 |
+
elif text:
|
41 |
+
ans = predict(text)
|
42 |
+
else:
|
43 |
+
ans = "please give input"
|
44 |
return ans
|
45 |
|
46 |
|