I have created a chatbot using nltk, keras and tkinter . And i have also created a website using python and flask . how can i intergrate both of them. i.e i can i make my chatbot run after the website gets open(run)
when i am importing the chatgui.py(this is chat bot file) and executing it in my main.py(this is the python file file that is building the website using the flask framework) , only any one of them is running, not the both.
Plz suggest me some idea , how can i make both of them run.
When a client visits your site, the client computer will not execute python code. Only the server side will execute the python code, so the tkinter part of your app is not needed. The user's gui is rendered with html/javascript in their browser.
There are a lot of ways to go about it, but I think the most common approach would be to scrap the GUI part written with tkinter, and instead re-create a javascript based GUI that will be served by flask. Have chats instead pass between the client and server with javascripts fetch api.
How to run a chatbot created using nltk , keras and tkinter on a website created using python and flask?