BigSalmon commited on
Commit
5858202
·
1 Parent(s): 4faaf90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(50)
144
  best_words = [tokenizer.decode([idx.item()]) for idx in best_indices]
145
- for i in best_words[0:50]:
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)