msaid1976 commited on
Commit
2671147
·
verified ·
1 Parent(s): 186f8c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -5,6 +5,12 @@ from chromadb.config import Settings
5
  from chromadb.utils import embedding_functions
6
  from sentence_transformers import SentenceTransformer
7
 
 
 
 
 
 
 
8
  # Load the Llama model using Hugging Face Transformers
9
  tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
10
  model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
 
5
  from chromadb.utils import embedding_functions
6
  from sentence_transformers import SentenceTransformer
7
 
8
+
9
+ api_token = os.getenv("HF_TOKEN")
10
+
11
+ # Log in using the token
12
+ login(api_token)
13
+
14
  # Load the Llama model using Hugging Face Transformers
15
  tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
16
  model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-chat-hf")