include complete generated text
Browse files- handler.py +2 -1
handler.py
CHANGED
|
@@ -95,7 +95,8 @@ class EndpointHandler:
|
|
| 95 |
|
| 96 |
answer = generated_text.split('>>END<<')[0].split('>>ANSWER<<:')[1].strip()
|
| 97 |
|
| 98 |
-
prediction = {'generated_text': answer.replace('<|endoftext|>', ''), 'time': f"{(end-start):.2f} s"}
|
|
|
|
| 99 |
|
| 100 |
result = []
|
| 101 |
result.append(prediction)
|
|
|
|
| 95 |
|
| 96 |
answer = generated_text.split('>>END<<')[0].split('>>ANSWER<<:')[1].strip()
|
| 97 |
|
| 98 |
+
#prediction = {'generated_text': answer.replace('<|endoftext|>', ''), 'time': f"{(end-start):.2f} s"}
|
| 99 |
+
prediction = {'generated_text': answer.replace('<|endoftext|>', ''), 'time': f"{(end-start):.2f} s", 'complete_ouput': generated_text}
|
| 100 |
|
| 101 |
result = []
|
| 102 |
result.append(prediction)
|