Skip to main content

Streamlit

This document contains a cheatsheet and other helpful things that were encountered while working with Streamlit apps

Installing and running the app

# To install streamlit
pip install streamlit

# To run a streamlit app
streamlit run app.py

Debugging Streamlit in VS Code

Use the following launch.json to debug a streamlit app. You might need to change the name of the py file from the default "app.py".

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Streamlit Debugger",
"type": "debugpy",
"request": "launch",
"program": "-m",
"args": [
"streamlit",
"run",
"AI-Prediction.py"
],
"console": "integratedTerminal"
},
]
}

Creating an exe out of streamlit

No.LinkStatus
1Creating a Streamlit Executable — PyMedPhysNot yet explored
2Streamlit Deployment as an Executable File (.exe) For Windows MacOS And Android - Deploying Streamlit - StreamlitNot yet explored

Refer the dnv-streamlit repo.