'How do I prevent terminal from hanging after running a tkinter program

I am working on a tkinter program but anytime I run the program, the terminal hangs. Is there a way I can prevent the terminal from hanging when the tkinter program is running? Thanks in advance

PS C:\Users\DANIEL\Desktop\exp\fcnvmb\results> & C:/ProgramData/Anaconda3/python.exe c:/Users/DANIEL/Desktop/exp/fcnvmb/GUI.py
***************** Loading Testing DataSet *****************

*******************************************
            START TESTING
*******************************************
C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\_reduction.py:42: UserWarning: size_average and reduce args will be deprecated, please use reduction='mean' instead.
  warnings.warn(warning.format(ret))
The testing psnr: 15.81, SSIM: 0.5168 
Testing complete in  0m 2s



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source