Please help me to convert normal python code to flask application

code is in link

Hi, what help are you looking for, exactly? Do you have previous experience using Flask at all? What exactly do you mean by “convert”? How do you want the Flask application to work, and how does that correspond to the existing code? (For example, what URLs will the user go to? What should happen in the program when the user goes there, and how will the results be presented?)

hey, thanks for your response, I am building a chatbot using this code , creating chatbot using html and this will render template for flask code ,Please help me. I am getting errors and i not able to resolve those.
code link : healthcare-chatbot/chat_bot.py at master · itachi9604/healthcare-chatbot · GitHub

sir can you help me in above problem