Spaces:
Runtime error
Runtime error
Anigor66
commited on
Commit
·
57b395c
1
Parent(s):
6b32938
Fix indentation error in try block
Browse files
app.py
CHANGED
|
@@ -35,11 +35,11 @@ def patched_torch_load(f, *args, **kwargs):
|
|
| 35 |
torch.load = patched_torch_load
|
| 36 |
|
| 37 |
try:
|
| 38 |
-
sam = sam_model_registry[MODEL_TYPE](checkpoint=MODEL_CHECKPOINT)
|
| 39 |
-
sam.to(device=device)
|
| 40 |
-
sam.eval()
|
| 41 |
-
predictor = SamPredictor(sam)
|
| 42 |
-
print("✓ MedSAM model loaded successfully!")
|
| 43 |
finally:
|
| 44 |
# Restore original torch.load
|
| 45 |
torch.load = original_torch_load
|
|
|
|
| 35 |
torch.load = patched_torch_load
|
| 36 |
|
| 37 |
try:
|
| 38 |
+
sam = sam_model_registry[MODEL_TYPE](checkpoint=MODEL_CHECKPOINT)
|
| 39 |
+
sam.to(device=device)
|
| 40 |
+
sam.eval()
|
| 41 |
+
predictor = SamPredictor(sam)
|
| 42 |
+
print("✓ MedSAM model loaded successfully!")
|
| 43 |
finally:
|
| 44 |
# Restore original torch.load
|
| 45 |
torch.load = original_torch_load
|