Spaces:
Runtime error
Runtime error
Remove input text from response
Browse files- 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 |
|