Skip to content
Snippets Groups Projects
Commit d987c29f authored by zverkov's avatar zverkov
Browse files

Fix output

parent af9cc98a
No related branches found
No related tags found
No related merge requests found
......@@ -201,12 +201,11 @@ Chat history: ```{chat_history}``` <|im_end|>
# tensor_input_ids, tensor_attention_mask = self.prepare_tensors(conversation)
with torch.no_grad():
input_ = self.prepare_prompt(conversation)
output = self.pipeline(input_)
output = self.pipeline(input_)[0]['generated_text']
output = output.split('\n')[0]
end_idx = output.find('```')
if end_idx != -1:
output = output[:end_idx]
print(output)
final_responses.append(output)
self.turn_id = self.turn_id % 7 + 1 # Turn id goes from 1 to 7
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment