Download request.py from JoanWaweru/Code-SwitchedSentimentAnalysis: direct link, hf CLI and curl.
- Browser
- Download file 145 Bytes
-
https://huggingface.co/JoanWaweru/Code-SwitchedSentimentAnalysis/resolve/main/request.py
- Command line
-
hf download hf://JoanWaweru/Code-SwitchedSentimentAnalysis/request.py
-
curl -L -o request.py https://huggingface.co/JoanWaweru/Code-SwitchedSentimentAnalysis/resolve/main/request.py
145 Bytes
| import requests | |
| url = 'http://localhost:5000/predict_api' | |
| r = requests.post(url,json={'negative':0, 'neutral':1, 'positive':2}) | |
| print(r.json()) |