Updated SMP model
Browse files
chatbot/agentic_rag/tools.py
CHANGED
|
@@ -413,7 +413,7 @@ def detect_lakes_and_calculate_area(input_str: str) -> str:
|
|
| 413 |
return f"GEE Authentication failed. Please ensure the EE_SERVICE_ACCOUNT_JSON secret is correctly configured in your Space settings. Error: {str(e)}"
|
| 414 |
|
| 415 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 416 |
-
model = smp.Unet(encoder_name="
|
| 417 |
|
| 418 |
ckpt_path = Path(__file__).resolve().parent.parent.parent / "models" / "lake_segmentation" / "best_model.pth"
|
| 419 |
if not ckpt_path.exists(): return f"Model weights not found at {ckpt_path}"
|
|
|
|
| 413 |
return f"GEE Authentication failed. Please ensure the EE_SERVICE_ACCOUNT_JSON secret is correctly configured in your Space settings. Error: {str(e)}"
|
| 414 |
|
| 415 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 416 |
+
model = smp.Unet(encoder_name="se_resnet50", encoder_weights=None, in_channels=15, classes=1, activation=None)
|
| 417 |
|
| 418 |
ckpt_path = Path(__file__).resolve().parent.parent.parent / "models" / "lake_segmentation" / "best_model.pth"
|
| 419 |
if not ckpt_path.exists(): return f"Model weights not found at {ckpt_path}"
|