hnishi / updated-dash-gpt3-chatbot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dash GPT-3 Chatbot


2023-12-31

This is the updated version of Dash GPT-3 Chatbot.

Python 3.12.0

Docker

docker compose up

Then, visit http://127.0.0.1:8050/.

Cloud Run

Deploy

gcloud run deploy --update-env-vars OPENAI_API_KEY=sk-xxx

Disclaimer: This app was created to help you learn Dash and try the OpenAI API beta. Feel free to use the source code for building private prototypes. If you are planning to deploy GPT-3 based apps, please make sure to reach out to support@openai.com for a proper review.

demo

This demo shows you how to build a chatbot with GPT-3. It features a highly customized UI without stepping out of Python.

The image was generated with StyleGAN v2.

This is the description we gave to GPT-3: snippet

For a smoother demo, watch the YouTube video here.

OpenAI GPT-3 API Access

In order to obtain access to the GPT-3 API, you will need to join the waitlist. Once you have the API, you can find the secret key in the quickstart, and export it as an environment variable:

export OPENAI_KEY="xxxxxxxxxxx"

Where "xxxxxxxxxxx" corresponds to your secret key.

Instructions

To get started, first clone this repo:

git clone https://github.com/plotly/dash-sample-apps.git
cd dash-sample-apps/apps/dash-gpt3-bars

Create a conda env:

conda create -n dash-gpt3-bars python=3.7.6
conda activate dash-gpt3-bars

Or a venv (make sure your python3 is 3.6+):

python3 -m venv venv
source venv/bin/activate  # for Windows, use venv\Scripts\activate.bat

Install all the requirements:

pip install -r requirements.txt

You can now run the app:

python app.py

and visit http://127.0.0.1:8050/.

Discussions

If you are interested in chatting with us about the technical aspect of this, or would like to share the Dash apps you created with your own OpenAI API tokens, join the discussion thread.

GPT-3 for Enterprises

If you are interested to use Dash and GPT-3 in an enterprise setting, please reach out, and we'd be happy to discuss how we can help with Dash Enterprise.

About


Languages

Language:Python 90.4%Language:Dockerfile 9.6%