Spaces:
Running
Running
admin
commited on
Commit
·
900716e
1
Parent(s):
507f6b1
sync ms
Browse files
app.py
CHANGED
|
@@ -61,7 +61,11 @@ def infer(target: str):
|
|
| 61 |
status = "Success"
|
| 62 |
filename = result = None
|
| 63 |
try:
|
| 64 |
-
model = torch.load(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|