Download app/utils.py from Nagraj23/shieldx: direct link, hf CLI and curl.
- Browser
- Download file 417 Bytes
-
https://huggingface.co/spaces/Nagraj23/shieldx/resolve/main/app/utils.py
- Command line
-
hf download hf://spaces/Nagraj23/shieldx/app/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Nagraj23/shieldx/resolve/main/app/utils.py
417 Bytes
| import datetime | |
| # --- Fixtures in app/utils.py --- | |
| # 1. Log Query Function: | |
| # This 'fixture' is a utility function designed for logging interactions. | |
| # It can be used to record user inputs and corresponding bot responses for | |
| # debugging, monitoring, or analytics purposes. | |
| def log_query(user_input: str, response: str): | |
| print(f"[{datetime.datetime.now()}] INPUT: {user_input} → OUTPUT: {response}") | |