Pierce Maloney
commited on
Commit
•
2872c1c
1
Parent(s):
366e62e
printing generated ids
Browse files- handler.py +1 -0
handler.py
CHANGED
@@ -37,6 +37,7 @@ class EndpointHandler():
|
|
37 |
|
38 |
# Decode the generated ids to text
|
39 |
# Exclude the input_ids length to get only the new tokens
|
|
|
40 |
prediction_text = self.tokenizer.decode(prediction_ids[0, input_ids.shape[1]:], skip_special_tokens=True)
|
41 |
return [{"generated_text": prediction_text}]
|
42 |
|
|
|
37 |
|
38 |
# Decode the generated ids to text
|
39 |
# Exclude the input_ids length to get only the new tokens
|
40 |
+
print("Generated IDs:", prediction_ids[0, input_ids.shape[1]:])
|
41 |
prediction_text = self.tokenizer.decode(prediction_ids[0, input_ids.shape[1]:], skip_special_tokens=True)
|
42 |
return [{"generated_text": prediction_text}]
|
43 |
|