Halleq commited on
Commit
c1efaf9
·
verified ·
1 Parent(s): 6716d13

Create whisper_asr

Browse files
Files changed (1) hide show
  1. whisper_asr +13 -0
whisper_asr ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # تحميل النموذج
4
+ model_id = "openai/whisper-small.en"
5
+ asr = gr.Interface.load(f"huggingface/{model_id}")
6
+
7
+ # واجهة Gradio
8
+ gr.Interface(
9
+ fn=asr,
10
+ inputs=gr.Audio(source="upload", type="filepath"),
11
+ outputs="text",
12
+ title="Whisper Speech Recognition"
13
+ ).launch()