Image captioning deployment

70 Views Asked by At
from tkinter import *
from PIL import ImageTk, Image
import joblib

model_img = joblib.load('img.pkl')

root  = Tk()
root.title("Image captioner")

my_img = ImageTk.PhotoImage(Image.open("D:\DL\Image Captioning\model\cycle and people.jpg"))
my_label = Label(image = my_img)
caption = model_img(my_label)
my_label.pack()


root.mainloop()

The above is deployment source code for image captioning project. While reading image into the model file, it shows the following error...

raise ValueError(ValueError: Incorrect format used for image. Should be an url linking to an image, a local path, or a PIL image.

What is the procedure to solve this error?

0

There are 0 best solutions below