Giter Site home page Giter Site logo

bcqguo / gemini-chatbot-interface-with-streamlit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ilhansevval/gemini-chatbot-interface-with-streamlit

0.0 1.0 0.0 3.59 MB

This project is a Streamlit-based chat application that interacts with the Gemini AI model, allowing users to engage in conversations with an artificial intelligence assistant. The application stores chat history, allowing users to revisit and continue previous conversations.

License: Apache License 2.0

Python 100.00%

gemini-chatbot-interface-with-streamlit's Introduction

Gemini Chatbot Interface with Streamlit

Overview

This project is a Streamlit-based chat application that interacts with the Gemini AI model, allowing users to engage in conversations with an artificial intelligence assistant. The application stores chat history, allowing users to revisit and continue previous conversations.

Getting Started

Dependencies

This code uses the following libraries:

  • streamlit: for building the user interface.
  • gemini: for chat
  • Gemini API key: Get it from Google AI Studio

Usage

Follow these steps to set up and run the project:

  1. Create a virtual environment:
python3 -m venv my_env
source my_env/bin/activate 
.\my_env\Scripts\activate 
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the Streamlit server:
streamlit run app_chat.py
  1. Access the application in your browser at http://localhost:8501.

  2. Start chatting with the assistant!

Repository Structure

repository/
├── app_chat.py               # the code and UI integrated together live here
├── requirements.txt     # the python packages needed to run locally
├── .streamlit/
│   └── config.toml      # theme info for the UI
├── data/                # folder for saved chat messages 
├── docs/                # preview for github

How it Works

The app as follows:

  1. The user enters a question in the input field.

  2. User messages are sent to the Gemini model for processing.

  3. The user's input, along with the chat history, is used to generate a response.

  4. The Gemini model generates a response based on the patterns it learned during training.

  5. The application saves chat messages and Gemini AI chat history to files for later retrieval.

  6. A new chat is created if the user initiates a conversation that hasn't been stored before, or user can go back to past chats.

gemini-chatbot-interface-with-streamlit's People

Contributors

ilhansevval avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.