Spaces:
Runtime error
Runtime error
Download sam.py from pengpeng2000/sam: direct link, hf CLI and curl.
- Browser
- Download file 232 Bytes
-
https://huggingface.co/spaces/pengpeng2000/sam/resolve/main/sam.py
- Command line
-
hf download hf://spaces/pengpeng2000/sam/sam.py
-
curl -L -o sam.py https://huggingface.co/spaces/pengpeng2000/sam/resolve/main/sam.py
232 Bytes
| # Load model directly | |
| from transformers import AutoProcessor, AutoModelForMaskGeneration | |
| processor = AutoProcessor.from_pretrained("facebook/sam-vit-base") | |
| model = AutoModelForMaskGeneration.from_pretrained("facebook/sam-vit-base") |