Download scripts/check_environment.py from Wizzas/DefectRAG: direct link, hf CLI and curl.
- Browser
- Download file 651 Bytes
-
https://huggingface.co/Wizzas/DefectRAG/resolve/main/scripts/check_environment.py
- Command line
-
hf download hf://Wizzas/DefectRAG/scripts/check_environment.py
-
curl -L -o check_environment.py https://huggingface.co/Wizzas/DefectRAG/resolve/main/scripts/check_environment.py
651 Bytes
| """Read-only dependency visibility report for editor/runtime troubleshooting.""" | |
| import importlib.util | |
| import json | |
| import sys | |
| if __name__=='__main__': | |
| names=['fastapi','uvicorn','torch','transformers','langchain_core','langchain_community','langchain_text_splitters','langgraph'] | |
| modules={name:((spec.origin or list(spec.submodule_search_locations or [])) if (spec:=importlib.util.find_spec(name)) else None) for name in names} | |
| print(json.dumps({'python':sys.executable,'modules':modules,'all_visible':all(v is not None for v in modules.values())},indent=2)) | |
| raise SystemExit(0 if all(v is not None for v in modules.values()) else 1) | |