Download predict from sparrow8i8/psych: direct link, hf CLI and curl.
- Browser
- Download file 186 Bytes
-
https://huggingface.co/sparrow8i8/psych/resolve/main/predict
- Command line
-
hf download hf://sparrow8i8/psych/predict
-
curl -L -o predict https://huggingface.co/sparrow8i8/psych/resolve/main/predict
186 Bytes
| labels = learn.dls.vocab | |
| def predict(img): | |
| img = PILImage.create(img) | |
| pred,pred_idx,probs = learn.predict(img) | |
| return {labels[i]: float(probs[i]) for i in range(len(labels))} |