A simple template for building LLM applications quickly, for hackathons and rapid prototyping. This template contains basic LLM client setup, environment variable management, a simple Gradio web interface, and is ready to extend with your features!
-
Install dependencies: Download
uvhere to install and manage packages (recommended). Change the foldermy_projectto the name of your project, and modify thepyproject.tomlfile to include the name and a short description of your project. Then, install the package and its dependencies:uv sync uv pip install -e .(Alternative: create a conda environment and run
pip install -e .) -
Add your API key:
cp .env.example .env # Edit .env with your API key -
Run the app:
uv run main.py
(Alternative: run with
python main.py) -
Open your browser to
http://localhost:7860to use the web interface! -
Customize! Modify the Gradio app, package structure, and add your own features! Make sure to add a "graphical abstract" of your work as well.
# Add a new package
uv add package-name├── main.py # Your main application with Gradio
├── notebooks/ # Notebooks for prototyping
├── src/
│ └── my_project/ # Your code goes here
├── .env.example # Template for API keys
└── pyproject.toml # Dependencies