Gemini Chatbot is a web-based chatbot application that uses the Gemini API to generate responses to user messages. The application is built using Flask for the backend, Gradio for an alternative frontend, and integrates with the Google Generative AI library.
- Web-based chat interface using Flask
- Alternative chat interface using Gradio
- Integration with Gemini API for generating responses
- Clear chat history functionality
- Python 3.7+
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/tedoaba/gemini_chatbot.git cd gemini_chatbot
-
Install the required Python packages:
pip install -r requirements.txt
-
Create a
.env
file in the root directory and add your Gemini API credentials:GEMINI_API_KEY=your_gemini_api_key GEMINI_ID=your_gemini_model_id
-
Navigate to the project directory:
cd gemini_chatbot
-
Run the Flask application:
python flask_app.py
-
Open your web browser and go to
http://127.0.0.1:5000
to access the chat interface.
-
Navigate to the project directory:
cd gemini_chatbot
-
Run the Gradio application:
python gradio_app.py
-
Open the provided Gradio link to access the chat interface.
- Type your message in the input box and click "Send" to receive a response from the chatbot.
- Click the "Clear Chat" button to clear the chat history.
gemini_chatbot/
├── src/
│ ├── api_client.py
│ ├── chatbot.py
│ └── utils.py
├── static/
│ ├── script.js
│ └── style.css
├── templates/
│ └── index.html
├── flask_app.py
├── gradio_app.py
├── requirements.txt
└── README.md
This project is licensed under the MIT License. See the LICENSE file for details.