"""
This type stub file was generated by pyright.
"""
from functools import lru_cache
from .model_loader import *
__location__ = ...
@lru_cache()
def get_available_memory(device): # -> Literal[51539607552, 0]:
...
@lru_cache()
def calculate_batch_size(device): # -> Literal[16, 256, 128, 64, 32]:
...
@lru_cache()
def get_device():
...
def set_model_device(model): # -> tuple[Any, Any]:
...
@lru_cache()
def get_home_folder(): # -> str:
...
@lru_cache()
def load_bert_base_uncased(): # -> tuple[Any, Any]:
...
@lru_cache()
def load_HF_embedding_model(model_name=...) -> tuple:
"""Load the Hugging Face model for embedding.
Args:
model_name (str, optional): The model name to load. Defaults to "BAAI/bge-small-en-v1.5".
Returns:
tuple: The tokenizer and model.
"""
...
@lru_cache()
def load_text_classifier():
...
@lru_cache()
def load_text_multilabel_classifier(): # -> tuple[Callable[..., list[Any]], Any]:
...
@lru_cache()
def load_nltk_punkt(): # -> ZipFilePathPointer | GzipFileSystemPathPointer | FileSystemPathPointer:
...
@lru_cache()
def load_spacy_model(): # -> None:
...
def download_all_models(remove_existing=...): # -> None:
"""Download all models required for Crawl4AI."""
...
def main(): # -> None:
...
if __name__ == "__main__":
...