ajeetkumar01 commited on
Commit
7283ba2
·
verified ·
1 Parent(s): 9f57ece

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, use_auth_token=True)
24
- model = AutoModelForCausalLM.from_pretrained(model_name, use_auth_token=True)
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