Spaces:
Runtime error
Runtime error
AI Assistant commited on
Commit ·
e14cf3f
1
Parent(s): 97de31f
Fix: improve error handling and update dependencies for stability
Browse files- __pycache__/app.cpython-312.pyc +0 -0
- app.py +14 -9
- requirements.txt +18 -18
__pycache__/app.cpython-312.pyc
ADDED
|
Binary file (22.8 kB). View file
|
|
|
app.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
| 1 |
-
|
| 2 |
-
import
|
| 3 |
-
|
| 4 |
-
from
|
| 5 |
-
from nemo.collections
|
| 6 |
-
|
| 7 |
-
import
|
| 8 |
-
import
|
| 9 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 1 |
+
try:
|
| 2 |
+
import os, shlex, subprocess, tempfile, traceback, glob, gc, shutil
|
| 3 |
+
import torch
|
| 4 |
+
from huggingface_hub import snapshot_download
|
| 5 |
+
from nemo.collections import asr as nemo_asr
|
| 6 |
+
from nemo.collections.asr.models import EncDecCTCModel, EncDecRNNTModel
|
| 7 |
+
import gradio as gr
|
| 8 |
+
import time
|
| 9 |
+
import psutil
|
| 10 |
+
import humanize
|
| 11 |
+
except Exception as e:
|
| 12 |
+
print("❌ Erreur critique lors de l'importation des dépendances :")
|
| 13 |
+
print(traceback.format_exc())
|
| 14 |
+
raise e
|
| 15 |
|
| 16 |
# Configuration
|
| 17 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
requirements.txt
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
-
# Build tools
|
| 2 |
-
Cython
|
| 3 |
-
packaging
|
| 4 |
-
setuptools
|
| 5 |
-
wheel
|
| 6 |
-
|
| 7 |
-
# Core dependencies
|
| 8 |
-
numpy<2.0.0
|
| 9 |
-
torch>=2.0.0
|
| 10 |
-
huggingface_hub=
|
| 11 |
-
nemo_toolkit[asr]==1.23.0
|
| 12 |
-
gradio=
|
| 13 |
-
psutil
|
| 14 |
-
humanize
|
| 15 |
-
|
| 16 |
-
# Fix: compatibilité pyarrow / datasets avec nemo_toolkit
|
| 17 |
-
pyarrow<14.0.0
|
| 18 |
-
datasets<2.14.0
|
|
|
|
| 1 |
+
# Build tools
|
| 2 |
+
Cython
|
| 3 |
+
packaging
|
| 4 |
+
setuptools
|
| 5 |
+
wheel
|
| 6 |
+
|
| 7 |
+
# Core dependencies
|
| 8 |
+
numpy<2.0.0
|
| 9 |
+
torch>=2.0.0
|
| 10 |
+
huggingface_hub>=0.23.0
|
| 11 |
+
nemo_toolkit[asr]==1.23.0
|
| 12 |
+
gradio>=4.44.1
|
| 13 |
+
psutil
|
| 14 |
+
humanize
|
| 15 |
+
|
| 16 |
+
# Fix: compatibilité pyarrow / datasets avec nemo_toolkit
|
| 17 |
+
pyarrow<14.0.0
|
| 18 |
+
datasets<2.14.0
|