Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import numpy as np
|
|
| 3 |
|
| 4 |
import gradio as gr
|
| 5 |
import os
|
| 6 |
-
os.system("sudo apt-get install nvIDia-cuda-toolkit")
|
| 7 |
os.system("pip3 install torch")
|
| 8 |
os.system("pip3 install collections")
|
| 9 |
os.system("pip3 install torchvision")
|
|
@@ -58,7 +58,7 @@ def crf_refine(img, annos):
|
|
| 58 |
return res.astype('uint8')
|
| 59 |
|
| 60 |
#import argparse
|
| 61 |
-
device='
|
| 62 |
net = build_model(device).to(device)
|
| 63 |
#net=torch.nn.DataParallel(net)
|
| 64 |
model_path = 'image_best.pth'
|
|
|
|
| 3 |
|
| 4 |
import gradio as gr
|
| 5 |
import os
|
| 6 |
+
#os.system("sudo apt-get install nvIDia-cuda-toolkit")
|
| 7 |
os.system("pip3 install torch")
|
| 8 |
os.system("pip3 install collections")
|
| 9 |
os.system("pip3 install torchvision")
|
|
|
|
| 58 |
return res.astype('uint8')
|
| 59 |
|
| 60 |
#import argparse
|
| 61 |
+
device='cpu'
|
| 62 |
net = build_model(device).to(device)
|
| 63 |
#net=torch.nn.DataParallel(net)
|
| 64 |
model_path = 'image_best.pth'
|