Download server/app/config.py from tsystems/visual_document_retrieval: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/spaces/tsystems/visual_document_retrieval/resolve/main/server/app/config.py
- Command line
-
hf download hf://spaces/tsystems/visual_document_retrieval/server/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/tsystems/visual_document_retrieval/resolve/main/server/app/config.py
718 Bytes
| import os | |
| from typing import Any, List, Tuple, Type | |
| class Settings: | |
| #============================================================================== | |
| GLOBAL_API_BASE="https://llm-server.llmhub.t-systems.net/queue" | |
| GLOBAL_API_KEY=os.getenv("GLOBAL_AIFS_API_KEY") | |
| app_settings = Settings() | |
| from loguru import logger | |
| import sys | |
| from datetime import time, timezone | |
| import os, time | |
| os.environ['TZ'] = 'Europe/Berlin' | |
| time.tzset() | |
| def only_level(level): | |
| def is_level(record): | |
| return record['level'].name == level | |
| return is_level | |
| #logger.remove(0) | |
| formato = '{time:YYYY-MM-DD HH:mm:ss.SS!UTC} {level:8} {message} [{file} : {line}]' | |
| logger.add(sys.stderr, format=formato, level="DEBUG") | |