Madhan-kumar-selvaraj / Artificial-intelligent-chatbot-heroku-deployment

AI chatbot designed for the coaching institute to respond to the students regarding the course details and deployed in the Flask web framework. Apart from that it can respond to the uses anything they ask.
https://madhankumarselvaraj.blogspot.com/2020/05/artificial-intelligent-chat-bot-with.html
1 stars 2 forks source link

Bot deployed in heroku is not answering to the queries #2

Open RoshanShifa opened 4 years ago

RoshanShifa commented 4 years ago

I used the same heroku deployment code of yours and ot worked well in the local but when hosted in heroku,it is deployed successfully and the screen gets displayed but when a question is asked to the bot,it simply answers nothing and doesnt respond!Where am i going wrong?Can u please help!?

Madhan-kumar-selvaraj commented 4 years ago

Can you share me the heroku link

RoshanShifa commented 4 years ago

This is the heroku app link: https://farmfriendlysoftwareagentbot.herokuapp.com

Can you share me the heroku link

https://farmfriendlysoftwareagentbot.herokuapp.com

Madhan-kumar-selvaraj commented 4 years ago

At this point of time, I can't predict the exact part of your issue. Try to deploy it again. If you still face that issue means run the script in your local machine and then use that workable code for deployment purpose by adding requirement and procfile. I hope it will work.

RoshanShifa commented 4 years ago

I tried the heroku deploymet code in local,it works fine in that but when I deploy the same code to heroku ,It is not responding to the queries but the scraping technique works well ...(I don't know if there is any error in training part..) And i also tried deploying the local script code by just including the proc file and the requirements file and i get an application error!

Can you please help me with this!!??

Madhan-kumar-selvaraj commented 4 years ago

Send me the error you are facing

On Thu, 25 Jun 2020, 18:50 RoshanShifa, notifications@github.com wrote:

I tried the heroku deploymet code in local,it works fine in that but when I deploy the same code to heroku ,It is not responding to the queries but the scraping technique works well ...(I don't know if there is any error in training part..) And i also tried deploying the local script code by just including the proc file and the requirements file and i get an application error!

Can you please help me with this!!??

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Madhan-kumar-selvaraj/chatbot-heroku-deployment/issues/2#issuecomment-649536383, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOEN27MGODUDJUOCN7TSF7LRYNFJPANCNFSM4OFCD4KA .

Madhan-kumar-selvaraj commented 4 years ago

I used the TensorFlow version 2+ while working in my local environment. But while I am trying to deploy it in the Heroku, I found that they allow maximum 500 MB slack space which means weight of all dependencies should be less than 500 MB. weight of TensorFlow 2+ is 470 MB and I can't use that version. For that purpose, I degraded the version to 1.14. So check the TensorFlow version and installation in the Heroku platform.

RoshanShifa commented 4 years ago

I used the TensorFlow version 2+ while working in my local environment. But while I am trying to deploy it in the Heroku, I found that they allow maximum 500 MB slack space which means weight of all dependencies should be less than 500 MB. weight of TensorFlow 2+ is 470 MB and I can't use that version. For that purpose, I degraded the version to 1.14. So check the TensorFlow version and installation in the Heroku platform.

I tensor flow version i am using is 1.15.2 But still the chatbot isn't responding.. I merely downloaded your heroku deployemnt github code and pushed it as such to my github repository and deployed it in heroku ...the deployemnt was successful but then the bot isnt responding to any of the queries but again all the other scraping technique works fine..

Will there be any error during the training or any other things?Can u plz help!

Madhan-kumar-selvaraj commented 4 years ago

Downgrade your tensorflow version to 1.15.2 and check whether it is working in your local machine.

RoshanShifa commented 4 years ago

I tried all the possibilities and now i get an application error

I have copied my logs nd pasted here.Look at the logs and try to help me if possible..!There is a warning in the logs and i dont know what is it actualy about!Below is the logs..

-----> Python app detected -----> No change in requirements detected, installing from cache -----> Installing SQLite3 -----> Installing requirements with pip -----> Downloading NLTK corpora… -----> Downloading NLTK packages: stopwords punkt wordnet /app/.heroku/python/lib/python3.6/runpy.py:125: RuntimeWarning: 'nltk.downloader' found in sys.modules after import of package 'nltk', but prior to execution of 'nltk.downloader'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) [nltk_data] Downloading package stopwords to /tmp/build_5e4332f1a8e55c [nltk_data] 16e558a5a9179c1cbe/.heroku/python/nltk_data... [nltk_data] Package stopwords is already up-to-date! [nltk_data] Downloading package punkt to /tmp/build_5e4332f1a8e55c16e5 [nltk_data] 58a5a9179c1cbe/.heroku/python/nltk_data... [nltk_data] Package punkt is already up-to-date! [nltk_data] Downloading package wordnet to /tmp/build_5e4332f1a8e55c16 [nltk_data] e558a5a9179c1cbe/.heroku/python/nltk_data... [nltk_data] Package wordnet is already up-to-date! -----> Discovering process types Procfile declares types -> web -----> Compressing... Done: 267.1M -----> Launching... Released v11 https://farmfriendlyagent.herokuapp.com/ deployed to Heroku

Please help out to resolve this application error

Madhan-kumar-selvaraj commented 4 years ago

Can you send me your requirement and Procfile

RoshanShifa commented 4 years ago

Procfile:

web: gunicorn app:app

Requirements:

Flask==1.1.1 gunicorn==19.9.0 requests==2.22.0 numpy==1.16.5 Keras==2.3.1 lxml==4.4.1 tensorflow==1.15.2 nltk==3.5

Madhan-kumar-selvaraj commented 4 years ago

Change the Tensorflow version to 1.14 and have a try. I think, your are facing some issue while downloading NLTK in the heroku.