liangzhongquan 2 年之前
父節點
當前提交
b3e30caf9b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      server.py

+ 2 - 2
server.py

@@ -26,8 +26,8 @@ model_dict = {model_name: None for model_name in model_selection_options} #set u
 colors = [tuple([random.randint(0, 255) for _ in range(3)]) for _ in range(100)] #for bbox plotting
 
 
-if model_dict[model_name] is None:
-          model_dict[model_name] = model = torch.hub.load(YOLO_DIR, 'custom', path=WEIGHTS, source='local').to(device)
+if model_dict['ocr-layout'] is None:
+          model_dict['ocr-layout'] = model = torch.hub.load(YOLO_DIR, 'custom', path=WEIGHTS, source='local').to(device)
           print("========>加载成功")