Skip to content

A feature-rich Gemini chatbot web app built with Python and Streamlit. Features integrated Google Search, chat history, and model selection.

License

Notifications You must be signed in to change notification settings

vj031206/VJ3-Gemini-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Gemini Chatbot in Python

A feature-rich chatbot web application built with Python using Google's Gemini API, Custom Search JSON API, and the Streamlit library. This project was developed as part of the Codexintern Python Developer internship.


✨ Features

  • 🌐 Integrated Google Search: Seamlessly toggle Google Search to get real-time information within your chats.
  • 📚 Chat History: Easily view and revisit your past conversations in the history tab. Expand any prompt to see the full response.
  • 🧠 Model Selection: Choose the specific Gemini model you want to interact with from a dropdown menu.

📸 Screenshots

Here's a glimpse of the application in action:

Chat Interface Chat History
2025-10-08 11 48 23 localhost 0782699b3427 2025-10-08 11 50 24 localhost 5114d0edc02a
Google Search Toggle Model Selection
2025-10-08 11 49 45 localhost dc61d47c41a9 Screenshot (89)

🚀 Getting Started

Follow these steps to set up and run the project on your local machine.

1. Clone the Repository

First, clone the repository to your local machine.

git clone https://github.com/vj031206/gemini-chat-in-python.git
cd gemini-chat-in-python

2. Create and Activate a Virtual Environment

It's recommended to create a virtual environment to manage dependencies.

  • On Linux/macOS:
    python3 -m venv venv
    source venv/bin/activate
  • On Windows:
    python -m venv venv
    venv\Scripts\activate

3. Install Dependencies

Install all the required Python packages from the requirements.txt file.

pip install -r requirements.txt

4. Set Up Environment Variables

You'll need to provide API keys for Google's services.

  1. Create a new file named .env in the root directory of the project.

  2. Copy the contents of .env.example into your new .env file.

  3. Add your API keys to the .env file:

    GEMINI_API_KEY="YOUR_KEY_HERE"
    SEARCH_API_KEY="YOUR_KEY_HERE"
    SEARCH_ENGINE_ID="YOUR_KEY_HERE"

5. Run the Application

Once the setup is complete, you can run the Streamlit app with the following command:

streamlit run Chat.py

Open your web browser and navigate to the local URL provided by Streamlit (usually http://localhost:8501).


📁 Other Projects

Feel free to check out my other projects:

About

A feature-rich Gemini chatbot web app built with Python and Streamlit. Features integrated Google Search, chat history, and model selection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages