Giter Club home page Giter Club logo

chatbot-for-own-website's Introduction

README for Streamlit Chatbot Interface with OpenAI

Overview

This Streamlit application provides an interactive interface for a chatbot powered by OpenAI. The chatbot is designed to retrieve and provide responses based on the content loaded from a CSV file named personal_posts.csv. The application uses OpenAI's embeddings and a vector store to efficiently fetch relevant responses.

Features

  • CSV Data Loading: Loads conversational data from personal_posts.csv.
  • Text Chunking: Splits large textual data into manageable chunks for efficient processing.
  • OpenAI Integration: Uses OpenAI's API for embeddings and conversation modeling.
  • Interactive UI: Provides a web interface for users to interact with the chatbot.

Setup

Prerequisites

  • Python 3.x
  • Streamlit
  • OpenAI Python SDK

Installation

  1. Clone the repository:
git clone <repository-url>
cd <repository-directory>
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Set up your OpenAI API key. You can do this by setting up Streamlit secrets or exporting it as an environment variable:
export OPENAI_API_KEY=your_openai_key

Running the App

To run the Streamlit app, execute the following command:

streamlit run streamlitapp.py

Usage

  1. Open the provided link in your browser after running the app.
  2. Click on the "Start" button to initiate the chatbot.
  3. Type your question or statement in the input box and press "Enter" or click "Submit".
  4. The chatbot will provide a response based on the content from personal_posts.csv.
  5. You can continue the conversation with the bot, and the chat history will be displayed on the screen.

Contributing

Feel free to fork the repository, make changes, and submit pull requests. Contributions are welcome!

License

This project is licensed under the MIT License. See the LICENSE file for details.

chatbot-for-own-website's People

Contributors

kgiamalis avatar

Watchers

 avatar

Forkers

hyperupscale

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.