Open sauravsinhaa opened 5 months ago
@sauravsinhaa, Thank you reporting this issue. This repository is for issues related to Cookbook guides and examples for Gemini API. The output is generated by the Gemini API and for issues related to Gemini API, we would suggest you to use "Send Feedback" option in Gemini docs. Ref: Screenshot below. You can also post this issue on Discourse forum.
Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.
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!")