File size: 298 Bytes
9997478
 
a3e56d8
9997478
08c7878
9997478
 
89191ca
9997478
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)