vhr1007 commited on
Commit
3408e43
·
1 Parent(s): 8411b7d
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -47,7 +47,8 @@ if not qdrant_url or not access_token:
47
 
48
  # Initialize the SentenceTransformer model with the cache directory managed by HF_HOME
49
  try:
50
- encoder = SentenceTransformer('nomic-ai/nomic-embed-text-v1.5')
 
51
  logging.info("Successfully loaded the SentenceTransformer model.")
52
  except Exception as e:
53
  logging.error(f"Failed to load the SentenceTransformer model: {e}")
 
47
 
48
  # Initialize the SentenceTransformer model with the cache directory managed by HF_HOME
49
  try:
50
+ cache_folder = os.path.join(hf_home_dir, "transformers_cache")
51
+ encoder = SentenceTransformer('nomic-ai/nomic-embed-text-v1.5', cache_folder=cache_folder)
52
  logging.info("Successfully loaded the SentenceTransformer model.")
53
  except Exception as e:
54
  logging.error(f"Failed to load the SentenceTransformer model: {e}")