Open MXC66ai opened 1 month ago
`import os from transformers import AutoModel, logging
logging.set_verbosity_error()
model_name = "google/siglip-so400m-patch14-384"
cache_dir = "~/.cache/huggingface/hub" # Default cache directory model_path = os.path.join(cache_dir, "models--google--siglip-so400m-patch14-384") if os.path.exists(model_path): print(f"Model '{model_name}' is already cached at: {model_path}") else: print(f"Model '{model_name}' is not cached. Downloading...")
# Download the model
try:
_ = AutoModel.from_pretrained(model_name)
print(f"Model '{model_name}' downloaded successfully!")
except Exception as e:
print(f"Error downloading model '{model_name}': {e}")`
ValueError Traceback (most recent call last)