Demo / test_toxic.py
cjell
fixing
89191ca
raw
history blame contribute delete
298 Bytes
import requests
url = "https://cjell-Demo.hf.space/toxic"
payload = {"text": "I hate you!"}
response = requests.post(url, json=payload)
data = response.json()
print("Status:", response.status_code)
try:
print("JSON:", response.json())
except Exception:
print("Raw text:", response.text)