Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nirmit27/gemini-ai
This is a Streamlit webapp powered by Gemini Pro API.
https://github.com/nirmit27/gemini-ai
ai-chatbot chatbot gemini gemini-api gemini-chatbot streamlit streamlit-webapp webapp
Last synced: 7 days ago
JSON representation
This is a Streamlit webapp powered by Gemini Pro API.
- Host: GitHub
- URL: https://github.com/nirmit27/gemini-ai
- Owner: nirmit27
- License: mit
- Created: 2024-09-04T06:34:50.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-10-09T15:26:40.000Z (3 months ago)
- Last Synced: 2024-11-11T02:35:35.291Z (2 months ago)
- Topics: ai-chatbot, chatbot, gemini, gemini-api, gemini-chatbot, streamlit, streamlit-webapp, webapp
- Language: Python
- Homepage: https://gemini-ai-6pieo6evhzghyj5rgazsje.streamlit.app/
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gemini AI
Gemini AI is an advanced AI-powered web application that provides a suite of services, including a chatbot, image captioning, text embedding, and a Q&A feature. The application is built using **[Streamlit](https://docs.streamlit.io/)**, leveraging the **Gemini Pro** model from Google’s generative AI capabilities.
## Features
### 1. ChatBot
- Engage with the Gemini Pro chatbot, capable of understanding and generating human-like text responses.
- The chat history is displayed to maintain the conversation context.### 2. Image Captioning:
- Upload an image and receive a descriptive caption generated by the Gemini AI model.
- Supports `.jpg`, `.jpeg`, and `.png` file formats.### 3. Text Embedding:
- Input text to generate embeddings useful for document retrieval and other NLP tasks.
- Embeddings are displayed as a list of floating-point numbers.### 4. Ask Me Anything:
- Pose any question, and the Gemini AI model will generate an informative answer.
## Project Structure
- `main.py`: The main file that sets up the Streamlit app and handles navigation between the different services offered.
- `streamlit_util.py`: Contains utility functions used across the Streamlit app for layout and styling.
- `gemini_util.py`: Contains utility functions for interacting with the Gemini AI models, including loading models, generating captions, embedding text, and handling user prompts.## Setup and Installation
### 1. Clone the repository
```bash
git clone https://github.com/username/gemini-ai.git
cd gemini-ai
```### 2. Install the required dependencies:
- Ensure you have Python 3.8 or above. Install dependencies using `pip`.
```bash
pip install -r requirements.txt
```### 3. Set up your environment:
- You'll need an API key from Google’s generative AI services. Set it up in your environment.
```bash
export API_KEY='your_api_key_here'
```### 4. Run the application:
- Start the Streamlit app.
```bash
streamlit run main.py
```## Usage
- ChatBot: Select the "ChatBot" option from the sidebar to interact with the AI chatbot.
- Image Captioning: Upload an image in the "Image Captioning" section to receive a descriptive caption.
- Text Embedding: Enter a piece of text in the "Embed text" section to get embeddings.
- Ask Me Anything: Pose a question in the "Ask Me Anything" section to get an answer.## Requirements
- Python 3.8+
- Streamlit
- Pillow
- Google Generative AI SDK
- streamlit-option-menuCheck out [requirements.txt](requirements.txt) for more details.
## Deployment link
> [Check it out!](https://gemini-ai-6pieo6evhzghyj5rgazsje.streamlit.app/)
## License
This project is licensed under the [MIT](https://opensource.org/license/mit/) License. Check the [LICENSE](LICENSE) file for more details.