Skip to content

Commit

Permalink
Use os.path.join to replace absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
kcz358 committed Sep 14, 2024
1 parent 86a293d commit 2b072c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lmms_eval/tasks/videomme/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ def videomme_doc_to_text(doc, lmms_eval_specific_kwargs=None):

def videomme_doc_to_text_subtitle(doc, lmms_eval_specific_kwargs=None):
cache_dir = os.path.join(base_cache_dir, cache_name)
video_path = "data/" + doc["videoID"] + ".mp4"
video_path = doc["videoID"] + ".mp4"
video_path = os.path.join(cache_dir, "data", video_path)
subtitle_path = os.path.join(cache_dir, "subtitle", doc["videoID"] + ".srt")
video_path = os.path.join(cache_dir, video_path)
if os.path.exists(subtitle_path): # Denote have subtitle
Expand Down

0 comments on commit 2b072c4

Please sign in to comment.