Spaces:
Runtime error
Runtime error
Limit generated sequences
Browse files- pipeline.py +1 -1
pipeline.py
CHANGED
@@ -13,5 +13,5 @@ class NewsPipeline(TextClassificationPipeline):
|
|
13 |
text = f" {self.tokenizer.sep_token} ".join([headline, content])
|
14 |
else:
|
15 |
text = headline
|
16 |
-
prediction = super().__call__(text)[0]
|
17 |
return {**prediction, "emoji": self.emojis[prediction["label"]]}
|
|
|
13 |
text = f" {self.tokenizer.sep_token} ".join([headline, content])
|
14 |
else:
|
15 |
text = headline
|
16 |
+
prediction = super().__call__(text, padding=True, truncation=True)[0]
|
17 |
return {**prediction, "emoji": self.emojis[prediction["label"]]}
|