File size: 342 Bytes
72724ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import requests

url = "https://Propvia-Testing.hf.space/hate"

payload = {"text": "You are a loser! 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)


print(data['label'])