Download predict.py from Dirake/Pokemon2: direct link, hf CLI and curl.
- Browser
- Download file 195 Bytes
-
https://huggingface.co/spaces/Dirake/Pokemon2/resolve/main/predict.py
- Command line
-
hf download hf://spaces/Dirake/Pokemon2/predict.py
-
curl -L -o predict.py https://huggingface.co/spaces/Dirake/Pokemon2/resolve/main/predict.py
195 Bytes
| import ultralytics | |
| from ultralytics import YOLO | |
| ultralytics.checks() | |
| import torch | |
| device = 'cuda' | |
| model = YOLO("best.pt") | |
| path ="test.mp4" | |
| results = model.predict(source=path, show = True) | |