market-feasibility-analysis-api / api_request_test.py
DylanonWic's picture
Upload 21 files
838e061 verified
raw
history blame
330 Bytes
import requests
url = "http://localhost:5000"
headers = {"Content-Type": "application/json"}
data = {"message": "Hello, chatbot!"}
response = requests.post(url, json=data, headers=headers)
if response.status_code == 200:
print("Chatbot response:", response.json().get("response"))
else:
print("Error:", response.json())