nourabulnasr commited on
Commit
c9bad21
·
verified ·
1 Parent(s): 8eef8b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,12 +10,13 @@ login(os.environ["HF_TOKEN"])
10
  model_id = "UBC-NLP/NileChat-3B"
11
 
12
  # Load tokenizer and model with authentication
13
- tokenizer = AutoTokenizer.from_pretrained(model_id, use_auth_token=True)
14
  model = AutoModelForCausalLM.from_pretrained(
15
  model_id,
16
  torch_dtype=torch.float16,
17
  device_map="auto",
18
- use_auth_token=True
 
19
  )
20
 
21
  # Simple prompt → reply function
 
10
  model_id = "UBC-NLP/NileChat-3B"
11
 
12
  # Load tokenizer and model with authentication
13
+ tokenizer = AutoTokenizer.from_pretrained(model_id, token=os.environ["HF_TOKEN"])
14
  model = AutoModelForCausalLM.from_pretrained(
15
  model_id,
16
  torch_dtype=torch.float16,
17
  device_map="auto",
18
+ token=os.environ["HF_TOKEN"]
19
+
20
  )
21
 
22
  # Simple prompt → reply function