Download src/utils/paths.py from dahutapea/Topic-Modeling-Tokopedia-Reviews: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/spaces/dahutapea/Topic-Modeling-Tokopedia-Reviews/resolve/main/src/utils/paths.py
- Command line
-
hf download hf://spaces/dahutapea/Topic-Modeling-Tokopedia-Reviews/src/utils/paths.py
-
curl -L -o paths.py https://huggingface.co/spaces/dahutapea/Topic-Modeling-Tokopedia-Reviews/resolve/main/src/utils/paths.py
500 Bytes
| """Resolve project paths so the app works no matter the current working directory | |
| (local `streamlit run` or Hugging Face Spaces).""" | |
| import os | |
| # this file is <root>/src/utils/paths.py -> go up 3 levels to the project root | |
| ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| ARTIFACTS = os.path.join(ROOT, "artifacts") | |
| LEXICON = os.path.join(ROOT, "colloquial-indonesian-lexicon.csv") | |
| LOGO = os.path.join(ROOT, "Topic Pulse.png") # drop the logo PNG in the repo root | |