Spaces:
Runtime error
Runtime error
jeevavijay10
commited on
Commit
•
f464a86
1
Parent(s):
ec23ee9
update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
5 |
# checkpoint = "Salesforce/codegen-2B-nl"
|
6 |
checkpoint = "Salesforce/codegen2-1B"
|
7 |
|
8 |
-
|
9 |
-
model = AutoModelForCausalLM.from_pretrained(checkpoint, cache_dir="models/")
|
10 |
model = AutoModelForCausalLM.from_pretrained(checkpoint)
|
11 |
|
12 |
def code_gen(text):
|
|
|
5 |
# checkpoint = "Salesforce/codegen-2B-nl"
|
6 |
checkpoint = "Salesforce/codegen2-1B"
|
7 |
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True)
|
9 |
+
# model = AutoModelForCausalLM.from_pretrained(checkpoint, cache_dir="models/")
|
10 |
model = AutoModelForCausalLM.from_pretrained(checkpoint)
|
11 |
|
12 |
def code_gen(text):
|