Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,19 +24,19 @@ from transformers import pipeline
|
|
24 |
model_id = "tarteel-ai/whisper-base-ar-quran" # update with your model id
|
25 |
pipe = pipeline("automatic-speech-recognition", model=model_id)
|
26 |
|
27 |
-
def transcribe(filepath):
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
import gradio as gr
|
35 |
-
|
36 |
-
iface = gr.Interface(
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
)
|
41 |
-
|
42 |
-
iface.launch()
|
|
|
24 |
model_id = "tarteel-ai/whisper-base-ar-quran" # update with your model id
|
25 |
pipe = pipeline("automatic-speech-recognition", model=model_id)
|
26 |
|
27 |
+
# def transcribe(filepath):
|
28 |
+
# output = pipe(
|
29 |
+
# filepath,
|
30 |
+
# max_new_tokens=10000,
|
31 |
+
# )
|
32 |
+
# return output["text"]
|
33 |
+
|
34 |
+
# import gradio as gr
|
35 |
+
|
36 |
+
# iface = gr.Interface(
|
37 |
+
# fn=transcribe,
|
38 |
+
# inputs=gr.Audio(source="upload", type="filepath"),
|
39 |
+
# outputs="text",
|
40 |
+
# )
|
41 |
+
|
42 |
+
# iface.launch()
|