Spaces:
Running
on
Zero
Running
on
Zero
fix: for loop
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def fix_compiled_state_dict(state_dict: dict):
|
|
26 |
|
27 |
def get_bad_words_ids(tokenizer: PreTrainedTokenizerFast):
|
28 |
ids = [
|
29 |
-
[id] for token, id in tokenizer.vocab.items() if any(word in token for BAD_WORD_KEYWORDS)
|
30 |
]
|
31 |
return ids
|
32 |
|
|
|
26 |
|
27 |
def get_bad_words_ids(tokenizer: PreTrainedTokenizerFast):
|
28 |
ids = [
|
29 |
+
[id] for token, id in tokenizer.vocab.items() if any(word in token for word in BAD_WORD_KEYWORDS)
|
30 |
]
|
31 |
return ids
|
32 |
|