Download handler.py from spacejot/inspect_server_conditions: direct link, hf CLI and curl.
- Browser
- Download file 595 Bytes
-
https://huggingface.co/spacejot/inspect_server_conditions/resolve/main/handler.py
- Command line
-
hf download hf://spacejot/inspect_server_conditions/handler.py
-
curl -L -o handler.py https://huggingface.co/spacejot/inspect_server_conditions/resolve/main/handler.py
595 Bytes
| import pkg_resources | |
| import logging | |
| class EndpointHandler: | |
| def __init__(self, path=""): | |
| dists = [str(d).replace(" ","==") for d in pkg_resources.working_set] | |
| for i in dists: | |
| logging.warning(i) | |
| print('so i try to print') | |
| logging.info('and i try using logging.info') | |
| logging.warning('and end off with logging.warning') | |
| def __call__(self): | |
| """ | |
| :param data: A dictionary contains `inputs` and optional `image` field. | |
| :return: A dictionary with `image` field contains image in base64. | |
| """ | |
| return |