Skip to content

solomon-wilson/shola_chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build your own GenAI Chatbot using Streamlit for frontend UI and OpenAI API

This repository contains the code for a simple web application built with Streamlit, which uses OpenAI's GPT-3 model for generating AI responses in a chat-like interface.

Prerequisites

  1. Python 3.6 or above
  2. An OpenAI API Key

App Demo

GenAIChatbot

Steps to run the application

1. Clone the repository to your local machine:

git clone https://github.com/spartasolopolo/shola_chatbot.git

2. Navigate to the project directory:

cd shola_chatbot
  1. Create a virtual environment and activate it:

On macOS and Linux:

python3 -m venv env
source myenv/bin/activate

On Windows:

python -m venv env
.\env\Scripts\activate

3a. Upgrade pip (optional but recommended)

pip install --upgrade pip
  1. Install the necessary Python packages:
pip install -r requirements.txt
  1. Create a .env file in the root directory of the project and add your OpenAI API key:
echo OPENAI_API_KEY=your-api-key > .env

OR

cp .env.example .env

Please replace your-api-key with your actual OpenAI API key.

  1. Run the Streamlit application:
streamlit run chatbot.py

Open a web browser and navigate to http://localhost:8501 to interact with the application.

License This project is open source, under the terms of the MIT license.

Note: This app makes requests to OpenAI's servers whenever the chat is used. Please be aware of this, especially if you're on a paid plan with OpenAI.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages