Spaces:
Running
A newer version of the Gradio SDK is available:
5.6.0
title: lv-recipe-chatbot
emoji: 🫑
colorFrom: green
colorTo: indigo
sdk: gradio
sdk_version: 4.36.1
app_file: app.py
pinned: false
license: unknown
lv-recipe-chatbot
Install
pip install -e '.[dev]'
How to use
from dotenv import load_dotenv
load_dotenv() # or load environment vars with different method
demo = app.create_demo(app.ConversationBot())
demo.launch()
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
or
python3 app.py
Dev quick-start
git clone
the repo
cd lv-recipe-chatbot
Make sure to use the version of python specified in py_version.txt
Create a virtual environment.
python3 -m venv env
Activate the env and install dependencies.
source env/bin/activate
pip install -r requirements.txt
pip install -r requirements/dev.txt
To make the Jupyter environment, git friendly: nbdev_install_hooks
If you want to render documentation locally, you will want to install
Quarto.
nbdev_install_quarto
Put API secrets in .env
cp .env.example .env
Edit .env with your secret key(s). Only OPEN_AI_KEY
is required.
Then start the Gradio demo from within the virtual environment.
python3 app.py
Preview documentation
nbdev_preview
Dependencies
If a new dependency for development is helpful for developers, add it to
dev.txt
.
If it is a dependency for the app that is imported in source code, add
it to core.txt
.
Then run:
scripts/pin_requirements.sh
This will update our requirements.txt
to include the dependency as it
should be pinned in the environment.
Development
Make changes in /nbs
.
Update the package files with nbdev_export
then reimport with
pip install -e '.[dev]'
Preview doc nbdev_preview
Build docs, test and update README nbdev_prepare