For all practical purposes you cannot have Tkinter GUI running on Colab.
You can emulate display but you will not be able to interact with it.
See
https://stackoverflow.com/q/61168210/4046632
https://stackoverflow.com/q/49478228/4046632
On a general note - Please, don't ask/offer people to edit your code directly online. You should post enough information (minimal reproducible example) - code (in python tags), traceback (in error tags), input/output data, etc. so that people on the forum can reproduce the problem and answer.
I strongly advise you to visit the help center
You can emulate display but you will not be able to interact with it.
See
https://stackoverflow.com/q/61168210/4046632
https://stackoverflow.com/q/49478228/4046632
On a general note - Please, don't ask/offer people to edit your code directly online. You should post enough information (minimal reproducible example) - code (in python tags), traceback (in error tags), input/output data, etc. so that people on the forum can reproduce the problem and answer.
I strongly advise you to visit the help center
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs