Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import WhisperProcessor, FlaxWhisperForConditionalGeneration
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
processor = WhisperProcessor.from_pretrained(model_name)
|
| 7 |
-
model = FlaxWhisperForConditionalGeneration.from_pretrained(model_name)
|
| 8 |
|
| 9 |
def transcribe(audio):
|
| 10 |
# Preprocess audio
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import WhisperProcessor, FlaxWhisperForConditionalGeneration
|
| 3 |
|
| 4 |
+
from transformers import pipeline
|
| 5 |
+
whisper_model = pipeline("automatic-speech-recognition", model="openai/whisper-small")
|
|
|
|
|
|
|
| 6 |
|
| 7 |
def transcribe(audio):
|
| 8 |
# Preprocess audio
|