Fake_Crypto_Claim_Detector / test_hf_api.py
ktoan911's picture
Upload folder using huggingface_hub
d158faa verified
raw
history blame contribute delete
527 Bytes
import json
import requests
url = "https://ktoan911-fake-crypto-claim-detector.hf.space/verify"
payload = {"claim": "Tỷ phú Elon Musk tặng 1000 Bitcoin trên X"}
headers = {"Content-Type": "application/json"}
print(f"Sending POST to {url}...")
try:
response = requests.post(url, json=payload, headers=headers)
print(f"Status Code: {response.status_code}")
print("Response JSON:")
print(json.dumps(response.json(), indent=4, ensure_ascii=False))
except Exception as e:
print("Error calling API:", e)