malekradwan130 commited on
Commit
6aca1c6
·
verified ·
1 Parent(s): 2540c77

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ # تحميل الموديل
5
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo")
6
+
7
+ def transcribe(audio):
8
+ result = pipe(audio)
9
+ return result["text"]
10
+
11
+ # واجهة التطبيق
12
+ iface = gr.Interface(
13
+ fn=transcribe,
14
+ inputs=gr.Audio(sources=["upload"], type="filepath"),
15
+ outputs="text",
16
+ title="Whisper Large V3 Turbo ASR",
17
+ description="ارفع ملف صوتي وسيتم تحويله إلى نص باستخدام Whisper Large V3 Turbo."
18
+ )
19
+
20
+ iface.launch()