If you go to compare sites the Nikon usually gets higher marks because of its sensor, so in theory it takes better photos, but that's not always as cut and dry as it seems.
The touchscreen on the t5i can help get shots you might not normally get with the d5200. Also you will have to learn the nikon all over again, button positions etc. It can often be that the set up or what you are used to gives the better photos.
I have a d7200 and an olympus EM5. In theory the d7200 has much better quality images, but very often I can get better shots of people on the fly because of its touchscreen. Also on close ups of babies ect i can touch the screen exactly where I want focus and this gives me a bigger keeper rate.
If the t5i lacks for you fair enough, the nikon might suit better. If not I'd just keep it
Compare the Canon Rebel T5i vs the Nikon D5200