harpreetsahota commited on
Commit
0459f8a
Β·
1 Parent(s): 2c70e90

adding force_download=True to model and tokenizer

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -34,8 +34,10 @@ tokenizer_fim.add_special_tokens({
34
  "pad_token": EOD,
35
  })
36
 
37
- tokenizer = AutoTokenizer.from_pretrained("bigcode/starcoder", use_auth_token=token)
38
- model = AutoModelForCausalLM.from_pretrained("Deci/DeciCoder-1b", trust_remote_code=True, use_auth_token=token).to(device)
 
 
39
  pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device=device)
40
 
41
  def post_processing(prompt: str, completion: str) -> str:
 
34
  "pad_token": EOD,
35
  })
36
 
37
+ tokenizer = AutoTokenizer.from_pretrained("bigcode/starcoder", use_auth_token=token, force_download=True)
38
+
39
+ model = AutoModelForCausalLM.from_pretrained("Deci/DeciCoder-1b", trust_remote_code=True, use_auth_token=token, force_download=True).to(device)
40
+
41
  pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device=device)
42
 
43
  def post_processing(prompt: str, completion: str) -> str: