Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ with st.form(key='my_form'):
|
|
62 |
logits, past_key_values = model(myinput, past_key_values = past_key_values, return_dict=False)
|
63 |
logits = logits[0,-1]
|
64 |
probabilities = torch.nn.functional.softmax(logits)
|
65 |
-
best_logits, best_indices = logits.topk(
|
66 |
best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
|
67 |
text.append(best_indices[0].item())
|
68 |
best_probabilities = probabilities[best_indices].tolist()
|
|
|
62 |
logits, past_key_values = model(myinput, past_key_values = past_key_values, return_dict=False)
|
63 |
logits = logits[0,-1]
|
64 |
probabilities = torch.nn.functional.softmax(logits)
|
65 |
+
best_logits, best_indices = logits.topk(350)
|
66 |
best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
|
67 |
text.append(best_indices[0].item())
|
68 |
best_probabilities = probabilities[best_indices].tolist()
|