cephcyn commited on
Commit
59d7881
·
verified ·
1 Parent(s): 1a63a25

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +8 -1
handler.py CHANGED
@@ -34,4 +34,11 @@ class EndpointHandler:
34
  predictions = self.pipeline(inputs)
35
 
36
  # postprocess the prediction
37
- return [{'next_chat_turn': e[0]["generated_text"][-1]} for e in predictions]
 
 
 
 
 
 
 
 
34
  predictions = self.pipeline(inputs)
35
 
36
  # postprocess the prediction
37
+ results = []
38
+ for e in predictions:
39
+ e_turn = e[0]["generated_text"][-1]
40
+ results.append({
41
+ 'next_chat_turn': e_turn,
42
+ 'next_chat_text': e_turn['content'],
43
+ })
44
+ return results