vhr1007 commited on
Commit
2425701
·
1 Parent(s): 5d717e3
Files changed (1) hide show
  1. utils/embedding_utils.py +6 -5
utils/embedding_utils.py CHANGED
@@ -18,16 +18,17 @@ import logging
18
  #load_dotenv()
19
 
20
  # Load Hugging Face token from environment variable
21
- huggingface_token = os.getenv('HUGGINGFACE_HUB_TOKEN')
22
 
23
 
24
- if huggingface_token:
25
- login(token=huggingface_token, add_to_git_credential=True, write_permission=True)
26
- else:
27
- raise ValueError("Hugging Face token is not set. Please set the HUGGINGFACE_HUB_TOKEN environment variable.")
28
 
29
  # Load model and tokenizer with authentication
30
  #model_name = 'nvidia/NV-Embed-v1'
 
31
  model_name = 'nomic-ai/nomic-embed-text-v1.5'
32
  model = SentenceTransformer('nomic-ai/nomic-embed-text-v1.5', trust_remote_code=True)
33
  model.max_seq_length = 4096
 
18
  #load_dotenv()
19
 
20
  # Load Hugging Face token from environment variable
21
+ # huggingface_token = os.getenv('HUGGINGFACE_HUB_TOKEN')
22
 
23
 
24
+ # if huggingface_token:
25
+ # login(token=huggingface_token, add_to_git_credential=True, write_permission=True)
26
+ # else:
27
+ # raise ValueError("Hugging Face token is not set. Please set the HUGGINGFACE_HUB_TOKEN environment variable.")
28
 
29
  # Load model and tokenizer with authentication
30
  #model_name = 'nvidia/NV-Embed-v1'
31
+
32
  model_name = 'nomic-ai/nomic-embed-text-v1.5'
33
  model = SentenceTransformer('nomic-ai/nomic-embed-text-v1.5', trust_remote_code=True)
34
  model.max_seq_length = 4096