Spaces:
Running
Running
czjun commited on
Commit ·
ac5d6e0
1
Parent(s): 897c2d5
feat: 移除token_type_ids以优化输入处理
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +1 -0
__pycache__/app.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
|
app.py
CHANGED
|
@@ -153,6 +153,7 @@ class HybridSummarizer:
|
|
| 153 |
truncation=True,
|
| 154 |
max_length=512,
|
| 155 |
)
|
|
|
|
| 156 |
inputs = {k: v.to(self.device) for k, v in inputs.items()}
|
| 157 |
max_new_tokens = max(48, min(192, int((target_length or 120) * 1.1)))
|
| 158 |
with torch.no_grad():
|
|
|
|
| 153 |
truncation=True,
|
| 154 |
max_length=512,
|
| 155 |
)
|
| 156 |
+
inputs.pop("token_type_ids", None)
|
| 157 |
inputs = {k: v.to(self.device) for k, v in inputs.items()}
|
| 158 |
max_new_tokens = max(48, min(192, int((target_length or 120) * 1.1)))
|
| 159 |
with torch.no_grad():
|