Spaces:
Running
Running
File size: 606 Bytes
021e065 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import httpx
import traceback
def run_debug():
url = "http://localhost:9201/api/v1/analysis/policy"
payload = {
"text": "Central Bank announces surprise 100 bps rate cut as inflation drops to 3.5%, citing room for growth stimulation.",
"tier": "D"
}
print(f"Sending request to {url}...")
try:
r = httpx.post(url, json=payload, timeout=60.0)
print(f"Status Code: {r.status_code}")
print(f"Response: {r.text}")
except Exception as e:
print("Exception caught:")
traceback.print_exc()
if __name__ == "__main__":
run_debug()
|