Welcome to the Gemini LLM Applications repository! This project demonstrates three innovative applications of the Gemini LLM (Large Language Model) for text-based question-answering, image-based analysis, and interactive chat history preservation. Built with Streamlit, these applications provide seamless integration with the Gemini API for dynamic and intelligent user interactions.
This repository contains three unique applications that showcase the capabilities of the Gemini LLM in various contexts:
- Text-Based Q&A: Provides instant responses to user questions using natural language understanding.
- Image-Based Analysis: Analyzes uploaded images and generates insights based on the image content and user-provided prompts.
- Chat History Preservation: Maintains an interactive chat session with preserved history, enabling users to track their queries and responses seamlessly.
- Enter a query and receive instant, accurate answers.
- Powered by the Gemini LLM for robust text comprehension.

- Upload an image (JPG, JPEG, PNG) and get detailed insights.
- Combines text prompts with image analysis for enhanced responses.

- Engage in a conversational experience with the Gemini LLM.
- Retain and display chat history for user convenience.

To run the applications locally, follow these steps:
- Create an API_KEY Update your API Key on ".env" file.
- Create a virtual environment
- Install dependencies: "pip install -r requirements.txt"
- Set up the environment variables:
- Create a .env file in the root directory.
- Add your Google Gemini API key: "GOOGLE_API_KEY=your_api_key_here"
- Run the desired application:
- streamlit run app_text_based.py # For Text-Based Q&A
- streamlit run app_image_based.py # For Image-Based Analysis
- streamlit run app_chat_history.py # For Chat History Preservation
- Launch the app.
- Enter a question in the text input box.
- Click the "Ask the Question" button to get an instant response.
- Launch the app.
- Upload an image (JPG, JPEG, PNG) using the file uploader.
- Optionally, enter a text prompt for additional context.
- Click "Tell about the image" to generate a response.
- Launch the app.
- Enter a query in the text input box.
- Click "Ask the question" to interact with the Gemini LLM.
- View the entire chat history displayed at the bottom of the page.
- Python: Core programming language for development.
- Streamlit: Framework for building web applications.
- Google Generative AI: Gemini LLM API for natural language and image understanding.
- Pillow: Library for image processing.
- dotenv: For managing environment variables securely.
- Support for multiple languages in the text-based Q&A application.
- Advanced image analysis with multimodal understanding.
- Options to download chat history in formats like PDF or JSON.
- User authentication for personalized experiences.
For questions or feedback, reach out at:
Ktrimalraoandtrimalrao2004@gmail.comandwww.linkedin.com/in/k-trimal-rao-397924253