Skip to content

Commit

Permalink
Merge pull request #24 from magic-research/dev
Browse files Browse the repository at this point in the history
strip space in response
  • Loading branch information
ermu2001 authored May 7, 2024
2 parents e2032aa + b178422 commit fd9194a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/eval/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def pllava_answer(conv: Conversation, model, processor, img_list, do_sample=True
split_tag = conv.roles[-1]
output_text = output_text.split(split_tag)[-1]
ending = conv.sep if isinstance(conv.sep, str) else conv.sep[1]
output_text = output_text.removesuffix(ending)
output_text = output_text.removesuffix(ending).strip()
conv.messages[-1][1] = output_text
return output_text, conv

0 comments on commit fd9194a

Please sign in to comment.