import joblib

from global_configs import root_dir

captions = joblib.load(f"{root_dir}/captions_clip.joblib")

for name in captions:
    caption = captions[name]
    with open(f'{root_dir}/captions_clip/{name}.txt', 'a') as the_file:
        the_file.write(f'{caption}\n')