Spaces:
Runtime error
Runtime error
yash161101
commited on
Commit
•
58c331d
1
Parent(s):
e2b1dc7
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ with st.form(key='my_form'):
|
|
35 |
logits, past_key_values = model(myinput, past_key_values = past_key_values, return_dict=False)
|
36 |
logits = logits[0,-1]
|
37 |
probabilities = torch.nn.functional.softmax(logits)
|
38 |
-
best_logits, best_indices = logits.topk(
|
39 |
best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
|
40 |
text.append(best_indices[0].item())
|
41 |
best_probabilities = probabilities[best_indices].tolist()
|
|
|
35 |
logits, past_key_values = model(myinput, past_key_values = past_key_values, return_dict=False)
|
36 |
logits = logits[0,-1]
|
37 |
probabilities = torch.nn.functional.softmax(logits)
|
38 |
+
best_logits, best_indices = logits.topk(200)
|
39 |
best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
|
40 |
text.append(best_indices[0].item())
|
41 |
best_probabilities = probabilities[best_indices].tolist()
|