Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lmms_eval/models/simple/srt_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ async def generate(self, request):
imgs = None
break

time_instruciton = f"The video lasts for {video_time:.2f} seconds, and {len(frames)} frames are uniformly sampled from it. These frames are located at {frame_time}.Please answer the following questions related to this video."
if self.add_time_instruction:
contexts = f"{time_instruciton}\n{contexts}"
time_instruction = f"The video lasts for {video_time:.2f} seconds, and {len(frames)} frames are uniformly sampled from it. These frames are located at {frame_time}.Please answer the following questions related to this video."
if self.add_time_instruction and self.modality == "video" and imgs is not None:
contexts = f"{time_instruction}\n{contexts}"
else:
contexts = f"{contexts}"
# Handling video decode error
Expand Down Expand Up @@ -243,9 +243,9 @@ def generate_sync(self, request):
imgs = None
break

time_instruciton = f"The video lasts for {video_time:.2f} seconds, and {len(frames)} frames are uniformly sampled from it. These frames are located at {frame_time}.Please answer the following questions related to this video."
if self.add_time_instruction:
contexts = f"{time_instruciton}\n{contexts}"
time_instruction = f"The video lasts for {video_time:.2f} seconds, and {len(frames)} frames are uniformly sampled from it. These frames are located at {frame_time}.Please answer the following questions related to this video."
if self.add_time_instruction and self.modality == "video" and imgs is not None:
contexts = f"{time_instruction}\n{contexts}"
else:
contexts = f"{contexts}"
# Handling video decode error
Expand Down
Loading