jeremyarancio
commited on
Commit
·
b861caa
1
Parent(s):
8af8877
Update
Browse files
app.py
CHANGED
@@ -85,12 +85,11 @@ def process(text: str) -> str:
|
|
85 |
add_special_tokens=True,
|
86 |
return_tensors="pt"
|
87 |
).input_ids
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
)
|
94 |
return tokenizer.decode(output[0], skip_special_tokens=True)[len(prompt):].strip()
|
95 |
|
96 |
|
|
|
85 |
add_special_tokens=True,
|
86 |
return_tensors="pt"
|
87 |
).input_ids
|
88 |
+
output = model.generate(
|
89 |
+
input_ids.to(zero.device), # GPU
|
90 |
+
do_sample=False,
|
91 |
+
max_new_tokens=512,
|
92 |
+
)
|
|
|
93 |
return tokenizer.decode(output[0], skip_special_tokens=True)[len(prompt):].strip()
|
94 |
|
95 |
|