Spaces:
Runtime error
Runtime error
harpreetsahota
commited on
Commit
Β·
ebe6cda
1
Parent(s):
a456012
Update app.py
Browse files
app.py
CHANGED
@@ -27,14 +27,14 @@ EOD = "<|endoftext|>"
|
|
27 |
|
28 |
GENERATION_TITLE= "<p style='font-size: 24px; color: #292b47;'>π» Your generated code:</p>"
|
29 |
|
30 |
-
tokenizer_fim = AutoTokenizer.from_pretrained("
|
31 |
|
32 |
tokenizer_fim.add_special_tokens({
|
33 |
"additional_special_tokens": [EOD, FIM_PREFIX, FIM_MIDDLE, FIM_SUFFIX, FIM_PAD],
|
34 |
"pad_token": EOD,
|
35 |
})
|
36 |
|
37 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
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 |
|
|
|
27 |
|
28 |
GENERATION_TITLE= "<p style='font-size: 24px; color: #292b47;'>π» Your generated code:</p>"
|
29 |
|
30 |
+
tokenizer_fim = AutoTokenizer.from_pretrained("bigcode/starcoder", use_auth_token=token, padding_side="left")
|
31 |
|
32 |
tokenizer_fim.add_special_tokens({
|
33 |
"additional_special_tokens": [EOD, FIM_PREFIX, FIM_MIDDLE, FIM_SUFFIX, FIM_PAD],
|
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 |
|