liangzhongquan 2 년 전
부모
커밋
2da25573e6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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')