Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
1ffedb9
1
Parent(s):
18b21ee
remove spaces.GPU decorator from load_model function and update requirements to include cuda-python
Browse files- app.py +1 -3
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
-
import spaces
|
5 |
import nemo.collections.asr as nemo_asr
|
6 |
from omegaconf import OmegaConf
|
7 |
import time
|
@@ -11,8 +10,7 @@ print(f"CUDA available: {torch.cuda.is_available()}")
|
|
11 |
if torch.cuda.is_available():
|
12 |
print(f"CUDA device: {torch.cuda.get_device_name(0)}")
|
13 |
|
14 |
-
# Initialize the ASR model
|
15 |
-
@spaces.GPU
|
16 |
def load_model():
|
17 |
print("Loading ASR model...")
|
18 |
# Load the NVIDIA NeMo ASR model
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
import torch
|
|
|
4 |
import nemo.collections.asr as nemo_asr
|
5 |
from omegaconf import OmegaConf
|
6 |
import time
|
|
|
10 |
if torch.cuda.is_available():
|
11 |
print(f"CUDA device: {torch.cuda.get_device_name(0)}")
|
12 |
|
13 |
+
# Initialize the ASR model - removed spaces.GPU decorator due to pickling issues
|
|
|
14 |
def load_model():
|
15 |
print("Loading ASR model...")
|
16 |
# Load the NVIDIA NeMo ASR model
|
requirements.txt
CHANGED
@@ -2,5 +2,5 @@ torch>=1.13.0
|
|
2 |
gradio>=3.32.0
|
3 |
nemo_toolkit[asr]>=1.18.0
|
4 |
omegaconf>=2.2.0
|
5 |
-
spaces>=0.15.0
|
6 |
numpy>=1.22.0
|
|
|
|
2 |
gradio>=3.32.0
|
3 |
nemo_toolkit[asr]>=1.18.0
|
4 |
omegaconf>=2.2.0
|
|
|
5 |
numpy>=1.22.0
|
6 |
+
cuda-python>=12.3
|