Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,10 +9,12 @@ import spaces
|
|
| 9 |
|
| 10 |
# Download and load the Whisper model for Portuguese
|
| 11 |
model_path = hf_hub_download(repo_id="distil-whisper/distil-large-v3-openai", filename="model.bin")
|
| 12 |
-
|
| 13 |
|
| 14 |
@spaces.GPU
|
| 15 |
def transcribe_audio(zip_file):
|
|
|
|
|
|
|
| 16 |
# Create a temporary directory to extract the ZIP file
|
| 17 |
with tempfile.TemporaryDirectory() as temp_dir:
|
| 18 |
# Extract ZIP file
|
|
|
|
| 9 |
|
| 10 |
# Download and load the Whisper model for Portuguese
|
| 11 |
model_path = hf_hub_download(repo_id="distil-whisper/distil-large-v3-openai", filename="model.bin")
|
| 12 |
+
|
| 13 |
|
| 14 |
@spaces.GPU
|
| 15 |
def transcribe_audio(zip_file):
|
| 16 |
+
model = load_model(model_path)
|
| 17 |
+
|
| 18 |
# Create a temporary directory to extract the ZIP file
|
| 19 |
with tempfile.TemporaryDirectory() as temp_dir:
|
| 20 |
# Extract ZIP file
|