Download src/modules/config.py from Akcom/test: direct link, hf CLI and curl.
- Browser
- Download file 613 Bytes
-
https://huggingface.co/spaces/Akcom/test/resolve/main/src/modules/config.py
- Command line
-
hf download hf://spaces/Akcom/test/src/modules/config.py
-
curl -L -o config.py https://huggingface.co/spaces/Akcom/test/resolve/main/src/modules/config.py
613 Bytes
| import os | |
| from src.utils.singleton import Singleton | |
| class Config: | |
| __metaclass__ = Singleton | |
| def __init__(self): | |
| # Debug | |
| self.debug_mode = os.environ.get( | |
| "DEBUG_MODE", False | |
| ).lower() in ['true', '1'] | |
| self.gpu_mode = os.environ.get( | |
| "GPU_MODE", False | |
| ).lower() in ['true', '1'] | |
| self.model_name = os.environ.get( | |
| "MODEL_NAME", "" | |
| ) | |
| self.cache_dir = os.environ.get( | |
| "CACHE_DIR", "/app/volume/.cache" | |
| ) | |
| self.models_cache_dir = self.cache_dir + "/models" | |
| config = Config() | |