- Text Generation
- Image Analysis
Follow the steps mentioned below to install and run the project. You may find more details about Gemini from Google's official documentation.
- Clone or download the repository
- Obtain your free API key from Get API Key. and paste it into the .env file in place of
your-api-key - Open cmd in the same directory and install Node using
npm icommand - Run the "gemini.js" server by
npm startcommand from terminal or using VS Code's run feature. You will also need to install all the necessary dependencies. See "package.json" file for those - In "Modules" folder you will find the text and image pages. You can open them and use their respective functionality
- Gemini Pro and Gemini Pro Vision models have been used for text and image processing
- Both functionalities have separate HTML pages
- Image Analysis makes use of a hardcoded prompt "Describe this image". You can change it inside the JavaScript part of the image.html page
- The prompt for image analysis can also be made dynamic to accept input from the user. I have not done it here but it is possible
- Image needs to be lesser than 4MB. This is Gemini's current limitation