BigSalmon commited on
Commit
c1074ac
·
1 Parent(s): 5890042

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -40,8 +40,8 @@ def extend(input_text, num_return_sequences, max_size=20, top_k=50, top_p=0.95):
40
  print(output_sequences)
41
  for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
42
  generated_sequence = generated_sequence.tolist()
43
- # Decode text
44
  text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True)
 
45
  # Remove all text after the stop token
46
  text = text[: text.find(stop_token) if stop_token else None]
47
  # Remove all text after 3 newlines
 
40
  print(output_sequences)
41
  for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
42
  generated_sequence = generated_sequence.tolist()
 
43
  text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True)
44
+ print(text)
45
  # Remove all text after the stop token
46
  text = text[: text.find(stop_token) if stop_token else None]
47
  # Remove all text after 3 newlines