Need help integrating chatbot into tkinter GUI

So I took a break from making the chatbot project and I realized I needed to redo a lot of the lessons to really ;learn what needed to be done, I decided to warm up by making a simple rule-based chatbot first. But then after doing that (the bot works fine. It could use more expansion, but it’s OK for now) I decided to look up tkinter and see what I could do to make it work by taking in input into a tkinter field and printing out the results.

Sadly I just couldn’t get it to work, and I’m mildly bummed… Anyone who is more skilled with Tkinter can give me some guidelines on what exactly I need to do to integrate the code into a tkinter? Or do I have to rewrite the whole thing again?