Spaces:
Runtime error
Runtime error
jeevavijay10
commited on
Commit
·
10fe91a
1
Parent(s):
742881b
update max tokens
Browse files
app.py
CHANGED
@@ -16,9 +16,10 @@ def code_gen(text):
|
|
16 |
pipe = pipeline(
|
17 |
model=checkpoint,
|
18 |
# tokenizer=tokenizer,
|
19 |
-
max_new_tokens=
|
20 |
temperature=0.7,
|
21 |
top_p=0.95,
|
|
|
22 |
repetition_penalty=1.15
|
23 |
)
|
24 |
|
|
|
16 |
pipe = pipeline(
|
17 |
model=checkpoint,
|
18 |
# tokenizer=tokenizer,
|
19 |
+
max_new_tokens=124,
|
20 |
temperature=0.7,
|
21 |
top_p=0.95,
|
22 |
+
device= "cuda" if torch.cuda.is_available() else "cpu",
|
23 |
repetition_penalty=1.15
|
24 |
)
|
25 |
|