Hosting on Heroku
- Install requirements from requirements.txt:
pip install -r requirements.txt
- Edit files in './config'.
- Run:
python main.py
Request the API:
import requests
api = requests.get(f'http://epis-programy.herokuapp.com/context/<random_string>/question/[<question>]')Get response:
if api.status_code == 200:
load = api.json()
response = load['success']
print(response)Args:
- random_string: a conversation id will keep the answer follow the conversation
- question: a question to ask