emisatti commited on
Commit
7ce89a1
1 Parent(s): 8d67eef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,9 +1,8 @@
1
  import gradio as gr
2
- # Load model directly
3
- from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
4
 
5
- processor = AutoProcessor.from_pretrained("tarteel-ai/whisper-base-ar-quran")
6
- model = AutoModelForSpeechSeq2Seq.from_pretrained("tarteel-ai/whisper-base-ar-quran")
7
 
8
  def transcribe(audio):
9
  # Get the output from the model
 
1
  import gradio as gr
2
+ from transformers import pipeline
 
3
 
4
+ # Load the model
5
+ model = pipeline("automatic-speech-recognition", model="tarteel-ai/whisper-base-ar-quran")
6
 
7
  def transcribe(audio):
8
  # Get the output from the model