A collection of cookiecutter templates for generating a skeleton for your next fantastic Streamlit app! 🎈
Plenty to deploy to Streamlit Cloud.
Options to develop in gitpod and deploy to heroku
Made with ❤️ from Gar's Bar
Make an awesome project with this?
Share it on twitter @garsbar35plus
or in the Streamlit Discuss Forums
- Ensure you have python 🐍 installed (if you don't, see my way)
- Install the
cookiecutter
🍪 package
python -m pip install cookiecutter
NOTE: These steps need to be followed once in order to use any cookiecutter template.
- Run
cookiecutter
on this repository- You'll have to press enter or type your own values to replace defaults for each option (more info below)
cookiecutter https://github.com/gerardrbentley/cookiecutter-streamlit
- Open up your new project directory in your favorite text editor to get hacking!
- Or just run it!
# Replace streamlit_app with your project directory name
cd streamlit_app
# If you don't have streamlit or other necessary packages installed, open your new README.md and get it installed!
streamlit run streamlit_app.py
BONUS: Use git clone
with the same url to customize the templates for your own liking then use cookiecutter cookiecutter-streamlit
github_username
: Used for github links and the "made by" textlicensor_name
: Your full name or company nameproject_name
: Name of your new appproject_slug
: defaults to camel_case version of your project nameproject_short_description
: Description of your projectinclude_streamlit_config
: defaults to "yes" to generate .streamlit/config.tomlinclude_heroku_deployment
: defaults to "no" to not generate Procfile, app.json, runtime.txtinclude_gitpod_config
: defaults to "no" to not generate .gitpod.ymlproject_template
: defaults to "hello_world", see below template descriptions
Streamlit "Hello World".
Just enough to get started with your streamlit app, a README, requirements, and github necessities.
Streamlit cheat sheet from daniellewisDL (MIT License included)
Provides example with YOLOv4-tiny model for receiving user image input, processing the image, and displaying the results.
User can provide an image via URL, file upload, or webcam.
Includes weights and configurations for YOLOv4-tiny on OpenCV from darknet github, which will not apply to all projects.
Roughly based on DrivenData's repo cookiecutter-data-science
Provides a directory structure for data processing pipeline, feature engineering, model training, and displaying all of these along with model prediction in the main streamlit app.
Save your project and share with the world! Start a repository on github (using the same name as your current folder will keep the documentation in line). Or use gitlab / gitea and change the folder name if you know what you're doing!
# Run once
git init
git remote add origin [email protected]:{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}.git
# Run for your changes and pushes
git add .
git commit -m "feat: Streamlit App Starter!"
git push
NOTE: In general don't git add .
useless files into your repo. This skeleton should be all useful though! Also take some time to learn branching if you're working with others!
- 🖥 Windows support
- ⚓️ Docker support
- Extended Makefile and example for Data Science template
- 🗄 Database template
- 📓 Text Processing template