snoop2head commited on
Commit
959ebd2
1 Parent(s): dc8d63b

remove error

Browse files
Files changed (1) hide show
  1. app.py +0 -12
app.py CHANGED
@@ -90,18 +90,6 @@ def infer_sentence(
90
  output_sequences = infer(input_ids, max_length, temperature, top_k, top_p)
91
  print(output_sequences)
92
 
93
- # exclude item that contains "unk"
94
- output_sequences = [
95
- output_sequence
96
- for output_sequence in output_sequences
97
- if "unk" not in output_sequence
98
- ]
99
- # choose item that length is longer than 1
100
- output_sequences = [
101
- output_sequence
102
- for output_sequence in output_sequences
103
- if len(output_sequence) > 1
104
- ]
105
  generated_sequence = output_sequences[0]
106
  print(generated_sequence)
107
 
 
90
  output_sequences = infer(input_ids, max_length, temperature, top_k, top_p)
91
  print(output_sequences)
92
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  generated_sequence = output_sequences[0]
94
  print(generated_sequence)
95