An interactive chatbot application built with Streamlit and powered by Google's Gemini API. Engage in dynamic conversations and experience the capabilities of advanced language models.
- Conversational AI: Interact with the Gemini language model for real-time responses.
- User-Friendly Interface: Clean and intuitive UI built with Streamlit.
- Session Management: Maintains conversation history during user sessions.
- Secure Configuration: Utilizes environment variables to manage API keys securely.
- Python 3.7 or higher
- pip package manager
-
Clone the repository:
Open Command Prompt (ideally in VS Code) and run:
git clone https://github.com/your-username/gemini-chatbot-streamlit.git
cd gemini-chatbot-streamlit
- Create a virtual environment:
conda create --name gemini-chatbot python=3.9
- Activate the virtual environment:
conda activate gemini-chatbot
- Install the dependencies:
pip install -r requirements.txt
- Set up environment variables:
-
Create a
.env
file in the project root directory. -
Add your Google Gemini API key to it like this:
GOOGLE_API_KEY=your_google_gemini_api_key
- Run the Streamlit application:
streamlit run app.py
The application should open in your browser at http://localhost:8501.
- API Key: Store your Gemini API key in the .env file as GOOGLE_API_KEY.
- Streamlit Settings: Optional customization via .streamlit/config.toml.
- Launch the app with streamlit run app.py.
- Enter your queries in the chat input.
- View real-time responses from the Gemini model.
- Session history is preserved during the browser session.
- Add user authentication
- enable persistent session history
- support mulltiple AI model options
- Dockerize the application for deployment
Contributions are welcome!
- Fork this repository.
- Create a new branch: git checkout -b feature/your-feature
- Commit your changes: git commit -m 'Add your feature'
- Push the branch: git push origin feature/your-feature
- Submit a pull request 🚀
This project is licensed under the MIT License. See the LICENSE file for details.
- Streamlit
- Google Gemini API
- Community tutorials and similar open-source projects for inspiration.