Spaces:
Sleeping
Sleeping
Download scripts/bootstrap_collection.py from dynamodenis254/docu-search: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/spaces/dynamodenis254/docu-search/resolve/main/scripts/bootstrap_collection.py
- Command line
-
hf download hf://spaces/dynamodenis254/docu-search/scripts/bootstrap_collection.py
-
curl -L -o bootstrap_collection.py https://huggingface.co/spaces/dynamodenis254/docu-search/resolve/main/scripts/bootstrap_collection.py
369 Bytes
| """One-time (idempotent) collection creation. | |
| Usage: | |
| python -m scripts.bootstrap_collection | |
| """ | |
| import logging | |
| from backend.core.qdrant_client import ensure_collection | |
| logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s") | |
| if __name__ == "__main__": | |
| created = ensure_collection() | |
| print("created" if created else "already existed") | |