Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -273,7 +273,7 @@ def generate(model, idx, max_new_tokens, context_size, tokenizer, text_to_token_
|
|
273 |
# print(token_ids_to_text(idx_next, tokenizer))
|
274 |
# Same as before: append sampled index to the running sequence
|
275 |
idx = torch.cat((idx, idx_next), dim=1) # (batch_size, num_tokens+1)
|
276 |
-
|
277 |
|
278 |
return new_idx
|
279 |
|
|
|
273 |
# print(token_ids_to_text(idx_next, tokenizer))
|
274 |
# Same as before: append sampled index to the running sequence
|
275 |
idx = torch.cat((idx, idx_next), dim=1) # (batch_size, num_tokens+1)
|
276 |
+
new_idx = re.sub(".", ". Meow.", idx)
|
277 |
|
278 |
return new_idx
|
279 |
|