Pierce Maloney
commited on
Commit
•
5e35500
1
Parent(s):
216cf30
getting generated_ids[0]
Browse files- __pycache__/handler.cpython-311.pyc +0 -0
- handler.py +1 -1
__pycache__/handler.cpython-311.pyc
CHANGED
Binary files a/__pycache__/handler.cpython-311.pyc and b/__pycache__/handler.cpython-311.pyc differ
|
|
handler.py
CHANGED
@@ -37,7 +37,7 @@ class EndpointHandler():
|
|
37 |
stopping_criteria=self.stopping_criteria,
|
38 |
)
|
39 |
|
40 |
-
generated_text = self.tokenizer.decode(generated_ids[0
|
41 |
prediction = [{"generated_text": generated_text}]
|
42 |
return prediction
|
43 |
|
|
|
37 |
stopping_criteria=self.stopping_criteria,
|
38 |
)
|
39 |
|
40 |
+
generated_text = self.tokenizer.decode(generated_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
|
41 |
prediction = [{"generated_text": generated_text}]
|
42 |
return prediction
|
43 |
|