admin commited on
Commit
900716e
·
1 Parent(s): 507f6b1
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -61,7 +61,11 @@ def infer(target: str):
61
  status = "Success"
62
  filename = result = None
63
  try:
64
- model = torch.load(f"{MODEL_DIR}/save.pt", map_location=torch.device("cpu"))
 
 
 
 
65
  if not target:
66
  raise ValueError("请上传细胞图片")
67
 
 
61
  status = "Success"
62
  filename = result = None
63
  try:
64
+ model = torch.load(
65
+ f"{MODEL_DIR}/save.pt",
66
+ map_location=torch.device("cpu"),
67
+ weights_only=False,
68
+ )
69
  if not target:
70
  raise ValueError("请上传细胞图片")
71