Create whisper_asr
Browse files- 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()
|