djl234 commited on
Commit
d3fa5af
·
1 Parent(s): 9d42a5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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='cuda:0'
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'