Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,10 +9,13 @@ subprocess.run(["pip", "install", "torch", "torchvision", "torchaudio", "-f", "h
|
|
9 |
|
10 |
import gradio as gr
|
11 |
import torchaudio
|
12 |
-
|
|
|
13 |
|
14 |
# Load the Whispy/Whisper Italian ASR model
|
15 |
-
|
|
|
|
|
16 |
|
17 |
# Define the ASR function
|
18 |
def transcribe_audio(audio):
|
|
|
9 |
|
10 |
import gradio as gr
|
11 |
import torchaudio
|
12 |
+
|
13 |
+
from transformers import AutoModelForSpeechRecognition, AutoTokenizer, pipeline
|
14 |
|
15 |
# Load the Whispy/Whisper Italian ASR model
|
16 |
+
model_name = "facebook/whisper-large-italian"
|
17 |
+
whisper_italian_asr = pipeline("automatic-speech-recognition", model=model_name, device=0)
|
18 |
+
|
19 |
|
20 |
# Define the ASR function
|
21 |
def transcribe_audio(audio):
|