shljessie commited on
Commit
34849f2
1 Parent(s): 9bb1dd2

use local model

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,8 @@ As a derivate work of [ConsistentAgents]() by Seonghee Lee.
17
 
18
  if torch.cuda.is_available():
19
  model_id = "./backprop_llama2_69_1e-05"
20
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
 
21
  tokenizer = AutoTokenizer.from_pretrained(model_id)
22
  tokenizer.use_default_system_prompt = False
23
 
 
17
 
18
  if torch.cuda.is_available():
19
  model_id = "./backprop_llama2_69_1e-05"
20
+ HF_ACCESS_TOKEN = os.getenv('HF_ACCESS_TOKEN')
21
+ model = AutoModelForCausalLM.from_pretrained(model_id, use_auth_token=HF_ACCESS_TOKEN, torch_dtype=torch.float16, device_map="auto")
22
  tokenizer = AutoTokenizer.from_pretrained(model_id)
23
  tokenizer.use_default_system_prompt = False
24