m-ric HF staff commited on
Commit
f3abd84
β€’
1 Parent(s): e4010d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -255,16 +255,12 @@ def generate_beams(start_sentence, scores, sequences, beam_indices):
255
  top_df_selected = top_df.sort_values("cumulative_score", ascending=False).iloc[
256
  :n_beams
257
  ]
258
- print(step)
259
- display(top_df_selected)
260
 
261
  # Write the scores table - one per beam source?
262
  # Edge case: if several beam indexes are actually on the same beam, the selected tokens by beam_index for the second one will be empty. So we reverse
263
  for beam_ix in reversed(list(range(n_beams))):
264
  current_beam = beam_trees[beam_ix]
265
  selected_tokens = top_df_selected.loc[top_df_selected["beam_index"] == beam_ix]
266
- print(step, beam_ix)
267
- display(selected_tokens)
268
  markdown_table = generate_markdown_table(
269
  step_scores[beam_ix, :],
270
  current_beam.cumulative_score,
 
255
  top_df_selected = top_df.sort_values("cumulative_score", ascending=False).iloc[
256
  :n_beams
257
  ]
 
 
258
 
259
  # Write the scores table - one per beam source?
260
  # Edge case: if several beam indexes are actually on the same beam, the selected tokens by beam_index for the second one will be empty. So we reverse
261
  for beam_ix in reversed(list(range(n_beams))):
262
  current_beam = beam_trees[beam_ix]
263
  selected_tokens = top_df_selected.loc[top_df_selected["beam_index"] == beam_ix]
 
 
264
  markdown_table = generate_markdown_table(
265
  step_scores[beam_ix, :],
266
  current_beam.cumulative_score,