Skip to content

Commit

Permalink
after black lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Luodian committed Sep 11, 2023
1 parent dff80c3 commit ac0cfcd
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pipeline/evaluation/models/otter.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,7 @@ def get_response(image: Image.Image, prompt: str, model=None, image_processor=No
num_beams=3,
no_repeat_ngram_size=3,
)
parsed_output = (
model.text_tokenizer.decode(generated_text[0])
.split("<answer>")[-1]
.lstrip()
.rstrip()
.split("<|endofchunk|>")[0]
.lstrip()
.rstrip()
.lstrip('"')
.rstrip('"')
)
parsed_output = model.text_tokenizer.decode(generated_text[0]).split("<answer>")[-1].lstrip().rstrip().split("<|endofchunk|>")[0].lstrip().rstrip().lstrip('"').rstrip('"')
return parsed_output


Expand Down

0 comments on commit ac0cfcd

Please sign in to comment.