Nova-school commited on
Commit
b8a7e1b
·
verified ·
1 Parent(s): c4c31c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -49,7 +49,7 @@ def Page():
49
  df["probs"] = top_10.values[0]+bottom_10.values[0]
50
  df["probs"] = [f"{value:.2%}" for value in df["probs"].values]
51
  df["next token ID"] = [top_10.indices[0][i].numpy() for i in range(10)]+[bottom_10.indices[0][i].numpy() for i in range(10)]
52
- df["predicted next token"] = [tokenizer.decode(top_10.indices[0][i]) for i in range(10)]+[tokenizer.decode(bottom_10.indices[0][i]) for i in range(10)]
53
  solara.Markdown("###Prediction")
54
  solara.DataFrame(df, items_per_page=20, cell_actions=cell_actions)
55
  Page()
 
49
  df["probs"] = top_10.values[0]+bottom_10.values[0]
50
  df["probs"] = [f"{value:.2%}" for value in df["probs"].values]
51
  df["next token ID"] = [top_10.indices[0][i].numpy() for i in range(10)]+[bottom_10.indices[0][i].numpy() for i in range(10)]
52
+ df["predicted next token"] = [tokenizer.decode(top_10.indices[0][i]) for i in range(10)]+[tokenizer.decode(bottom_10.indices[0][i])+10 for i in range(10)]
53
  solara.Markdown("###Prediction")
54
  solara.DataFrame(df, items_per_page=20, cell_actions=cell_actions)
55
  Page()