Spaces:
Sleeping
Sleeping
fix model device
Browse files
README.md
CHANGED
@@ -3,7 +3,7 @@ title: MOSA-Net Plus
|
|
3 |
emoji: ⚡
|
4 |
colorFrom: red
|
5 |
colorTo: gray
|
6 |
-
sdk:
|
7 |
pinned: false
|
8 |
license: apache-2.0
|
9 |
---
|
|
|
3 |
emoji: ⚡
|
4 |
colorFrom: red
|
5 |
colorTo: gray
|
6 |
+
sdk: gradio
|
7 |
pinned: false
|
8 |
license: apache-2.0
|
9 |
---
|
app.py
CHANGED
@@ -28,8 +28,7 @@ model_asli = model_asli.to(device)
|
|
28 |
@spaces.GPU
|
29 |
def predict_mos(wavefile:str):
|
30 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
31 |
-
|
32 |
-
model.to(device)
|
33 |
if device != model_asli.device:
|
34 |
model_asli.to(device)
|
35 |
|
|
|
28 |
@spaces.GPU
|
29 |
def predict_mos(wavefile:str):
|
30 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
31 |
+
model.to(device)
|
|
|
32 |
if device != model_asli.device:
|
33 |
model_asli.to(device)
|
34 |
|