m-ric HF staff commited on
Commit
85a45ca
β€’
1 Parent(s): f93f8e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -375,10 +375,7 @@ def get_beam_search_html(input_text, number_steps, number_beams, length_penalty)
375
  markdown = "Output sequences:"
376
  decoded_sequences = tokenizer.batch_decode(outputs.sequences)
377
  for i, sequence in enumerate(decoded_sequences):
378
- markdown += f"\n- {sequence} (score {outputs.sequences_scores[i]:.2f})"
379
- print("Markdown output")
380
- print(markdown)
381
- print(input_text, decoded_sequences)
382
 
383
  original_tree = generate_beams(
384
  input_text,
 
375
  markdown = "Output sequences:"
376
  decoded_sequences = tokenizer.batch_decode(outputs.sequences)
377
  for i, sequence in enumerate(decoded_sequences):
378
+ markdown += f"\n- {sequence.replace('<s> ', '')} (score {outputs.sequences_scores[i]:.2f})"
 
 
 
379
 
380
  original_tree = generate_beams(
381
  input_text,