I have created a rasa chat bot that is working properly on my system. chat response below
But when I deployed It on the Heroku the bot is not responding. chat responses below
Here is my code link GitHub code repository and Heroku deployed app link Heroku link
Can anyone tell me what is problem with this?
I have used docker image to manage dependencies but I think my model is not properly deployed. I want to get an answer from the model.
CodePudding user response:
Your Flask application needs to bind to the port exposed by Heroku with the $PORT
env variable. On localhost
it works on 5000 but on Heroku the port is dynamic
p = int(os.environ.get("PORT", 5000))
app.run(debug=True, port=p, host='0.0.0.0')
CodePudding user response:
Your project relies on 2 open ports. This is not possible with Heroku because your webbrowser clients make a connection with your flask app in the browser and have to send API calls to your rasa action server.
1 port is used for the rasa action server.
1 port is used for your flask app.
Your rasa action server declared in start_services.sh
is never started.
Put your rasa action server in a separate Heroku app. Point the API endpoint calls of your flask app to that new Heroku app.