milyiyo commited on
Commit
a8843ce
·
1 Parent(s): 88e8eb8

Remove input text from response

Browse files
Files changed (1) hide show
  1. functions.py +1 -0
functions.py CHANGED
@@ -107,6 +107,7 @@ def generate_question(text: str):
107
  max_new_tokens=256,
108
  generation_config=generation_config)
109
  output = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
 
110
  print(['generate_question', 'end'])
111
  return output
112
 
 
107
  max_new_tokens=256,
108
  generation_config=generation_config)
109
  output = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
110
+ output = output.replace(input_text, '')
111
  print(['generate_question', 'end'])
112
  return output
113