Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ st.title("📦 Volume Estimation using SAM Segmentation + MiDaS Depth")
|
|
| 24 |
# Load SAM and MiDaS models
|
| 25 |
@st.cache_resource
|
| 26 |
def load_models():
|
| 27 |
-
sam_checkpoint = "sam_vit_b_01ec64.pth" # Make sure this file is present in the same folder
|
| 28 |
sam = sam_model_registry["vit_b"](checkpoint=sam_checkpoint).to("cuda" if torch.cuda.is_available() else "cpu")
|
| 29 |
predictor = SamPredictor(sam)
|
| 30 |
|
|
|
|
| 24 |
# Load SAM and MiDaS models
|
| 25 |
@st.cache_resource
|
| 26 |
def load_models():
|
| 27 |
+
sam_checkpoint = "https://drive.google.com/file/d/1pgv2kKrytyY2_uHSypJh5yQz2BRlfjSS/view?usp=drive_link/sam_vit_b_01ec64.pth" # Make sure this file is present in the same folder
|
| 28 |
sam = sam_model_registry["vit_b"](checkpoint=sam_checkpoint).to("cuda" if torch.cuda.is_available() else "cpu")
|
| 29 |
predictor = SamPredictor(sam)
|
| 30 |
|