Spaces:
Running
Running
| 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() | |