FrancescoSaverioZuppichini / gradioGPT

Easy to hack template for your next chatGPT app with Gradio and Langchain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

title emoji colorFrom colorTo sdk sdk_version app_file pinned
GradioGPT
πŸš€
red
orange
gradio
3.32.0
app.py
false

GradioGPT

A perfect starting template for your amazing new shiny GPT application that comes with a gradio demo

gradioGPT.webm

πŸ”₯ Features

πŸ’» Installation

Create a .env file with your OpenAI API Key

echo "OPENAI_API_KEY=<YOUR_API_KEY>" > .env

You .env should look like

OPENAI_API_KEY=<YOUR_KEY>

Virtual Enviroment

You can use python virtual env

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Then

cd src
gradio app.py

Using gradio is great because it gives you hot reloading

Docker

Easy peasy

docker build -t gradio-app .
docker run --rm -it -p 7860:7860 \
    -e GRADIO_SERVER_NAME=0.0.0.0 \
    -v $(pwd)/.env:/app/.env \
    gradio-app

Then, navigate to http://0.0.0.0:7860/

You can also change the python version used (defaults to 3.11) by

docker build --build-arg PYTHON_VERSION=3.9 -t gradio-app .

πŸ† contribution

Want to contribute? Thanks a lot! Please Fork it and PR it πŸ™

About

Easy to hack template for your next chatGPT app with Gradio and Langchain


Languages

Language:Python 88.2%Language:Makefile 7.8%Language:Dockerfile 4.0%