Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ def authenticate_huggingface():
|
|
20 |
def load_llama_model():
|
21 |
authenticate_huggingface() # Ensure authentication is done before loading
|
22 |
model_name = "meta-llama/Llama-2-7b-hf"
|
23 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name,
|
24 |
-
model = AutoModelForCausalLM.from_pretrained(model_name,
|
25 |
return tokenizer, model
|
26 |
|
27 |
# Function to query the Llama 2 model
|
|
|
20 |
def load_llama_model():
|
21 |
authenticate_huggingface() # Ensure authentication is done before loading
|
22 |
model_name = "meta-llama/Llama-2-7b-hf"
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, token=True)
|
24 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, token=True)
|
25 |
return tokenizer, model
|
26 |
|
27 |
# Function to query the Llama 2 model
|