Tonic commited on
Commit
de59cef
1 Parent(s): 51cd369

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,8 +11,8 @@ headers = {"Authorization": f"Bearer {hf_token}"}
11
 
12
 
13
  model_name = "allenai/OLMo-1B"
14
- tokenizer = AutoTokenizer.from_pretrained(model_name)
15
- model = AutoModelForCausalLM.from_pretrained(model_name)
16
 
17
  def generate_text(prompt, max_new_tokens, top_k, top_p, do_sample):
18
  inputs = tokenizer(prompt, return_tensors='pt', return_token_type_ids=False)
 
11
 
12
 
13
  model_name = "allenai/OLMo-1B"
14
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
15
+ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
16
 
17
  def generate_text(prompt, max_new_tokens, top_k, top_p, do_sample):
18
  inputs = tokenizer(prompt, return_tensors='pt', return_token_type_ids=False)