Spaces:
Sleeping
Sleeping
Download src copy/utils.py from THU-CVML/flowillower_app_template: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/THU-CVML/flowillower_app_template/resolve/main/src%20copy/utils.py
- Command line
-
hf download 'hf://spaces/THU-CVML/flowillower_app_template/src copy/utils.py'
-
curl -L -o utils.py https://huggingface.co/spaces/THU-CVML/flowillower_app_template/resolve/main/src%20copy/utils.py
577 Bytes
| # utils.py | |
| from pathlib import Path | |
| from enum import Enum, auto | |
| # Base path for studies and trials. | |
| # Streamlit apps are typically run from their root directory. | |
| # If your app.py is in 'src/', and 'data/' is at the same level as 'src/', | |
| # then Path("./data") from app.py's perspective would be Path("../data"). | |
| # For simplicity, assuming data is relative to where streamlit run is executed, | |
| # or you adjust this path accordingly. | |
| DATA_ROOT_PATH = Path("./data").resolve() | |
| class AppMode(Enum): | |
| VIEWING = auto() | |
| # Potentially other modes like COMPARISON, EDITING etc. | |