Spaces:
Sleeping
Sleeping
Download predict.py from yenslife/SecureMLAPI: direct link, hf CLI and curl.
- Browser
- Download file 246 Bytes
-
https://huggingface.co/spaces/yenslife/SecureMLAPI/resolve/main/predict.py
- Command line
-
hf download hf://spaces/yenslife/SecureMLAPI/predict.py
-
curl -L -o predict.py https://huggingface.co/spaces/yenslife/SecureMLAPI/resolve/main/predict.py
246 Bytes
| import json | |
| import requests | |
| url = "https://yenslife-SecureMLAPI.hf.space/predict" | |
| with open("person.jpg", "rb") as f: | |
| r = requests.post(url, files={"file": ("person.jpg", f, "image/jpeg")}) | |
| print(r.status_code) | |
| print(json.dumps(r.json())) | |