Run on Multiple Images #201
Labels
component:other
Issues unrelated to examples/quickstarts
status:awaiting response
Awaiting a response from the author
status:stale
Issue/PR is marked for closure due to inactivity
type:feature request
New feature request/enhancement
Description of the feature request:
I cant run on multiple images as i am trying to run it on many images and store there output but it is saying
{
"image": "800040_2.pdf_4.jpg",
"description": "I am sorry, I cannot access or process any external files, including images. Therefore, I am unable to extract information from the provided image. \n\nTo assist you, I need the text content of the menu itself. If you can copy and paste the text here, I can help you process it and return the data in the JSON format you requested. \n"
}
What problem are you trying to solve with this feature?
But when i run on single images it works please let me know what i have done wrong
Any other information you'd like to share?
import os
import json
import google.generativeai as genai
import google.generativeai as genai
from google.colab import userdata
GOOGLE_API_KEY=userdata.get('secretName')
genai.configure(api_key=GOOGLE_API_KEY)
model = genai.GenerativeModel('gemini-1.5-flash')
image_directory = '/content/unzipped_files/New folder/'
for filename in os.listdir(image_directory):
if filename.lower().endswith(('.png', '.jpg', '.jpeg')):
img_path = os.path.join(image_directory, filename)
print("JSON files created successfully!")
The text was updated successfully, but these errors were encountered: