Spaces:
Paused
Paused
GPT response formatted
Browse files- generate_answer.py +2 -2
generate_answer.py
CHANGED
@@ -15,5 +15,5 @@ def generate_answer(question):
|
|
15 |
output = model.generate(**encoded_input, max_length=100) # Use generate method for text generation
|
16 |
# Decode the model output to text
|
17 |
decoded_output = tokenizer.decode(output[0])
|
18 |
-
response_text = decoded_output
|
19 |
-
return response_text
|
|
|
15 |
output = model.generate(**encoded_input, max_length=100) # Use generate method for text generation
|
16 |
# Decode the model output to text
|
17 |
decoded_output = tokenizer.decode(output[0])
|
18 |
+
response_text = decoded_output.split('\n\n', 1)
|
19 |
+
return response_text[1]
|