Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -512,7 +512,7 @@ def main(input_text, max_new_tokens):
|
|
| 512 |
encoded = torch.tensor(tokenizer.encode(input_text.strip())).unsqueeze(0).to(device)
|
| 513 |
|
| 514 |
with torch.no_grad():
|
| 515 |
-
token_ids =
|
| 516 |
model=model, idx=encoded,
|
| 517 |
max_new_tokens=max_new_tokens, context_size=context_size,
|
| 518 |
top_k=25, temperature=1.4, text_to_token_ids=text_to_token_ids, tokenizer=tokenizer
|
|
|
|
| 512 |
encoded = torch.tensor(tokenizer.encode(input_text.strip())).unsqueeze(0).to(device)
|
| 513 |
|
| 514 |
with torch.no_grad():
|
| 515 |
+
token_ids = generate(
|
| 516 |
model=model, idx=encoded,
|
| 517 |
max_new_tokens=max_new_tokens, context_size=context_size,
|
| 518 |
top_k=25, temperature=1.4, text_to_token_ids=text_to_token_ids, tokenizer=tokenizer
|