app
app
Main file to run the application.
This script initializes the application, sets up the user interface, and determines which functionality to execute based on the selected tab and the options in the sidebar.
- The application includes various tabs for different functionalities, such as:
One agent (for 2D/3D agent creation and visualisation)
Crowd (for 2D/3D crowd creation, visualisation, and generation of .xml config files)
Anthropometry (for data visualisation and analysis)
About (for displaying general information about the project)
Examples
To run the application, execute these commands from the root directory of the project:
>>> pip install --upgrade pip
>>> pip install uv
>>> uv sync
>>> uv run streamlit run src/streamlit_app/app/app.py
documentation
About tab of the app.
ui
User interface module.
Create a menu bar with multiple tabs and icons, adapting its appearance to Streamlit's selected theme.
- Returns:
The selected option from the menu bar.
- Return type:
Any
Notes
Streamlit's
st.markdownis used to apply custom CSS styles.The
option_menufunction creates the menu bar with specified tabs and icons.The
unsafe_allow_html=Trueparameter enables Streamlit to render raw HTML and CSS.The
stylesdictionary customizes the appearance of the menu bar.Icons can be selected from https://icons.getbootstrap.com/.