Update app.py
Browse files
app.py
CHANGED
@@ -140,9 +140,9 @@ def LogProbs(prompt):
|
|
140 |
logits, past_key_values = model(myinput, past_key_values = past_key_values, return_dict=False)
|
141 |
logits = logits[0,-1]
|
142 |
probabilities = torch.nn.functional.softmax(logits)
|
143 |
-
best_logits, best_indices = logits.topk(
|
144 |
best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
|
145 |
-
for i in best_words[0:
|
146 |
print("_______")
|
147 |
f = i
|
148 |
col1.append(f)
|
|
|
140 |
logits, past_key_values = model(myinput, past_key_values = past_key_values, return_dict=False)
|
141 |
logits = logits[0,-1]
|
142 |
probabilities = torch.nn.functional.softmax(logits)
|
143 |
+
best_logits, best_indices = logits.topk(20)
|
144 |
best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
|
145 |
+
for i in best_words[0:20]:
|
146 |
print("_______")
|
147 |
f = i
|
148 |
col1.append(f)
|