import requests, json # Test /get-advice with the actual prediction context context = { "prediction": { "Hardness": {"median": 94.69, "lower": 91.0, "upper": 97.0}, "Dissolution_Rate": {"median": 89.40, "lower": 89.3, "upper": 89.5}, "Friability": {"median": 0.67}, "Content_Uniformity": {"median": 98.44}, "Disintegration_Time": {"median": 8.20} }, "carbon": {"current": 62.9, "budget": 12.3} } r = requests.post('http://localhost:8000/get-advice', json={"context": context}) print("STATUS:", r.status_code) d = r.json() print("ADVICE:") print(json.dumps(d, indent=2)[:1000])