liangzhongquan 2 yıl önce
ebeveyn
işleme
2da25573e6
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      server.py

+ 2 - 2
server.py

@@ -14,8 +14,8 @@ YOLO_DIR = '/workspace/yolov5'
 # WEIGHTS = '/data/yolov5/runs/train/yolov5x_layout_reuslt37/weights/best.pt'
 WEIGHTS = '/workspace/best.pt'
 
-device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
-
+device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
+print(device)
 
 app = FastAPI()
 templates = Jinja2Templates(directory = 'templates')