Every widget needs parent. If you don't use it then tkinter assigs widget to main window.
And you have this problem in Label(image = poke) because you forgot win in
pika = Label(win, image=poke)
This is why you see rectangle in main window instead of toplevel window.
Second: There is bug in PhotoImage. Garbage Collector removes it from memory when it is created in function and assigned to local variable. And then you can see empty image.
You have to assign PhotoImage to global variable or assign to other widget in function.
Popular solution with assigning to other widget:
poke = PhotoImage(file = "pika.gif")
pika = Label(win, image=poke)
pika.photo = poke # <-- assign PhotoImage to other widget too
Python Course in Pune