diff --git a/python_server/__pycache__/server.cpython-313.pyc b/python_server/__pycache__/server.cpython-313.pyc index a70f5f9..7e87f12 100644 Binary files a/python_server/__pycache__/server.cpython-313.pyc and b/python_server/__pycache__/server.cpython-313.pyc differ diff --git a/python_server/server.py b/python_server/server.py index b542839..b2091ee 100644 --- a/python_server/server.py +++ b/python_server/server.py @@ -41,16 +41,15 @@ logging.basicConfig(level=logging.INFO) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") logging.info(f"Using device: {device}") -# Adjust this path for local model folder -#model_path = "./model/clip-vit-base-patch32" -model_path = "models/clip-vit-large-patch14" +# Use model directly from HuggingFace (auto-downloads and caches) +model_path = "openai/clip-vit-base-patch32" # Using base model for faster loading - -logging.info("Loading CLIP model...") +logging.info(f"Loading CLIP model from HuggingFace: {model_path}...") +logging.info("(Model will be cached after first download)") model = CLIPModel.from_pretrained(model_path).to(device) processor = CLIPProcessor.from_pretrained(model_path) model.eval() -logging.info("Model loaded.") +logging.info("Model loaded successfully.") # Qdrant connection '''qdrant = QdrantClient(