Demo / test_sentiment.py
cjell
final
cc2a8ff
raw
history blame
303 Bytes
import requests
url = "https://cjell-Demo.hf.space/sentiment"
payload = {"text": "The people working outside are loud"}
response = requests.post(url, json=payload)
print("Status:", response.status_code)
try:
print("JSON:", response.json())
except Exception:
print("Raw text:", response.text)