This tool uses the Google AI language model to generate detailed descriptions for images. It allows you to provide an image and a prompt to describe the image in detail.
Installation
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git
-
Install dependencies:
go mod tidy
-
Set up your Google API key:
-
Create a .env
file in the project directory.
-
Add your Google API key to the .env
file:
Google_Api=YOUR_API_KEY_HERE
-
Another way of setting up your Google API key:
Usage
Run the program with the following command:
go run main.go -image_path=path/to/your/image.png -prompt="Describe the image in detail"
Replace path/to/your/image.png
with the path to your image file and "Describe the image in detail"
with your desired prompt.
Usage for Normal Q/A
Run the program with the following command for Normal Q/A :
go run main.go -prompt="What is the meaning of life ?"
Configuration
You can configure the tool using command-line flags:
-api_key
: Specify your Google API key.
-image_path
: Path to the image file.
-prompt
: Prompt to describe the image (default is "Describe the image with detailed manner").
Contributing
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
).
- Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
).
- Push to the branch (
git push origin feature-branch
).
- Create a new Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.