Load a Vicinity instance from the Hugging Face Hub. :param repo_id: The repository ID on the Hugging Face Hub. :param token: Optional authentication token for private repositories. :param **kwargs: Additional arguments passed to Dataset.load_from_hub(). :ret
(cls: type[Vicinity[Any]], repo_id: str, token: str | None = None, **kwargs: Any)
| 312 | |
| 313 | @classmethod |
| 314 | def load_from_hub(cls: type[Vicinity[Any]], repo_id: str, token: str | None = None, **kwargs: Any) -> Vicinity[Any]: |
| 315 | """ |
| 316 | Load a Vicinity instance from the Hugging Face Hub. |
| 317 | |
| 318 | :param repo_id: The repository ID on the Hugging Face Hub. |
| 319 | :param token: Optional authentication token for private repositories. |
| 320 | :param **kwargs: Additional arguments passed to Dataset.load_from_hub(). |
| 321 | :return: A Vicinity instance. |
| 322 | """ |
| 323 | from vicinity.integrations.huggingface import load_from_hub |
| 324 | |
| 325 | items, vector_store, backend, config = load_from_hub(repo_id=repo_id, token=token) |
| 326 | return Vicinity(items, backend, metadata=config["metadata"], vector_store=vector_store) |
| 327 | |
| 328 | def evaluate( |
| 329 | self, |
nothing calls this directly
no test coverage detected