Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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")
|