Spaces:
Sleeping
Sleeping
Download utils/utils.py from nampham1106/image-retrieval: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/spaces/nampham1106/image-retrieval/resolve/main/utils/utils.py
- Command line
-
hf download hf://spaces/nampham1106/image-retrieval/utils/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/nampham1106/image-retrieval/resolve/main/utils/utils.py
474 Bytes
| from pymilvus import MilvusClient, connections | |
| CLUSTER_ENDPOINT = "https://in03-875693e98e705a1.api.gcp-us-west1.zillizcloud.com" | |
| TOKEN = "ee74ec4f760451b2c0602c784343318402c12b4cceadd34344f0290884ab537c63f1ec14df031f07c968105b162e43eac9ac310f" | |
| def create_client(): | |
| connections.connect( | |
| "default", | |
| uri=CLUSTER_ENDPOINT, | |
| token=TOKEN | |
| ) | |
| client = MilvusClient( | |
| uri=CLUSTER_ENDPOINT, | |
| token=TOKEN | |
| ) | |
| return client |