Testing / test_spam.py
Propvia's picture
adding tests
72724ba
raw
history blame contribute delete
385 Bytes
import requests
url = "https://Propvia-Testing.hf.space/spam"
payload = {"text": "Congratulations you have won $1000! Click the link to claim your prize!"}
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'])