Spaces:
Sleeping
Sleeping
| # Download SAM model if it doesn't exist | |
| if [ ! -d "pretrained_model" ]; then | |
| mkdir -p pretrained_model | |
| fi | |
| if [ ! -f "pretrained_model/sam_vit_h.pth" ]; then | |
| echo "Downloading SAM ViT-H model..." | |
| wget -P pretrained_model https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth | |
| mv pretrained_model/sam_vit_h_4b8939.pth pretrained_model/sam_vit_h.pth | |
| fi | |
| # Run the app | |
| echo "Running ProtoSAM demo..." | |
| python app.py |