Download docgenie/generation/utils/log.py from Text-to-Document-Generation/Docgenie-API: direct link, hf CLI and curl.
- Browser
- Download file 301 Bytes
-
https://huggingface.co/spaces/Text-to-Document-Generation/Docgenie-API/resolve/main/docgenie/generation/utils/log.py
- Command line
-
hf download hf://spaces/Text-to-Document-Generation/Docgenie-API/docgenie/generation/utils/log.py
-
curl -L -o log.py https://huggingface.co/spaces/Text-to-Document-Generation/Docgenie-API/resolve/main/docgenie/generation/utils/log.py
301 Bytes
| import inspect | |
| from pathlib import Path | |
| def log_pipeline_level(): | |
| # Get the previous frame (the caller) | |
| frame = inspect.stack()[1] | |
| caller_file = frame.filename | |
| level_name = Path(caller_file).name | |
| print(f"\n-----> {level_name.upper()} <-----") | |
| # input("PRESS KEY") | |