'How to display images inside the new tab in Python using tkinter

so I have been trying to display an image viewer app in a new tab from my first one. Wanted that after I click a button a new tab with pictures will appear. Is it possible to do using Tkinter? If so here is the part of the code and I would love any advice:

root = tk.Tk()
root.title('chat bot for discord')
def newV():
    set = tk.Tk()
    image1 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image2 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image3 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image4 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image5 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image6 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image7 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image8 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image9 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image10 = ImageTk.PhotoImage(Image.open("-----------------------.jpg"))
    image_list = [image1, image2, image3, image4, image5, image6, image7, image8, image9, image10]
    image_label = ttk.Label(image=image1)
    image_label.grid(column=1, row=1, columnspan=3)
    def next(slides_num):
        image_label = ttk.Label(image=image_list[slides_num - 1])
        nextButton = ttk.Button(set, text=">>", command=lambda: next(slides_num + 1))
        if slides_num == 10:
            nextButton = ttk.Button(set, text="done", state=DISABLED)
        image_label.grid(column=1, row=1, columnspan=3)
        functionButton.grid(column=1, row=5)
        nextButton.grid(column=2, row=5)

    functionButton = ttk.Button(set, text="press here")
    nextButton = ttk.Button(set, text=">>", command=lambda: next(2))
    functionButton.grid(column=1, row=5)
    nextButton.grid(column=2, row=5)
    set.mainloop()

newVariablesButton = ttk.Button(root, text="set computer cordinates", command=newV)
newVariablesButton.grid(column=2, row=5)
root.mainloop()


Sources

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

Source: Stack Overflow

Solution Source