Professional Documents
Culture Documents
Matrix
Matrix
def generate_caption(image_name):
# Get the image id from the image name
image_id = image_name.split('.')[0]
# Create a tokenizer
tokenizer = Tokenizer()
tokenizer.fit_on_texts(actual_captions + predicted_captions)