elina12 commited on
Commit
dc820d1
1 Parent(s): ed018e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -16
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
- 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()
 
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()