Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -137,7 +137,7 @@ class WordConstraintLogitsProcessor(LogitsProcessor):
|
|
| 137 |
self.constraints = constraints
|
| 138 |
self.prompt_len = prompt_len
|
| 139 |
|
| 140 |
-
def __call__(self, input_ids, scores,
|
| 141 |
if scores.dim() != 3:
|
| 142 |
return scores
|
| 143 |
committed_len = input_ids.shape[1] - self.prompt_len
|
|
|
|
| 137 |
self.constraints = constraints
|
| 138 |
self.prompt_len = prompt_len
|
| 139 |
|
| 140 |
+
def __call__(self, input_ids, scores, cur_step=None):
|
| 141 |
if scores.dim() != 3:
|
| 142 |
return scores
|
| 143 |
committed_len = input_ids.shape[1] - self.prompt_len
|