sdg-api / test.py
MakPr016
Updated Limiter
20ffbac
raw
history blame contribute delete
359 Bytes
import requests
url = "https://makpr016-sdg-api.hf.space/classify"
payload = {"text": "clean water for rural communities", "top_k": 3}
for i in range(25):
response = requests.post(url, json=payload)
print(f"Request {i+1}: Status {response.status_code}")
if response.status_code == 429:
print("RATE LIMITED:", response.text)
break