for img, questions, answers in zip(examples['image'], examples['questions']['question'], examples['questions']['answer']):
for q, a in zip(questions, answers):
inputs = processor(images=img, text=q, padding="max_length", truncation=True, return_tensors="pt")
processed_inputs['input_ids'].append(inputs['input_ids'][0])
processed_inputs['attention_mask'].append(inputs['attention_mask'][0])
processed_inputs['pixel_values'].append(inputs['pixel_values'][0])
processed_inputs['labels'].append(a)
return processed_inputs
Man thank you but when i run same script in colab i get different error.
Like remove column names train, validation not present found imageā¦ Something like this
There are actually errors that only occur in Colab, but the most common one is when the library version is different and the error content changes. Letās try raising and lowering the library version in Colab. accelerate, transformers, datasets, and huggingface_hub have a significant impact.
I have some knowledge of trouble patterns, but Iām still a beginner when it comes to generative AI. Iām not suited to teaching because I donāt know much about the essence of training.
I think the best way to get started is to try out some courses.
Another option is to ask questions on HF Discord, which has more people than the forum. There are a lot of people on there who are knowledgeable about NLP. If youāre used to using Discord, it should be easy, but if youāre not, Iāll explain.