Demo / test_toxic.py
cjell
final
cc2a8ff
raw
history blame
336 Bytes
import requests
url = "https://cjell-Demo.hf.space/toxic"
payload = {"text": "I do not agree with the policies being put in place by our city council."}
response = requests.post(url, json=payload)
print("Status:", response.status_code)
try:
print("JSON:", response.json())
except Exception:
print("Raw text:", response.text)