<jupyter_start><jupyter_text>Pick random test image<jupyter_code>from src.utils import get_training_data
import numpy as np
import shutil
config = Config("config.yaml")
df = get_training_data(config.IMAGE_ID_FILE_TEST, config.CAPTION_FILE)
def pick_random_test_image(df):
    idx = np.random.randint(low=0, high=len(df))
    image_id = df.iloc[idx]["IMAGE_ID"]
    caption = df.iloc[idx]["CAPTION"]
    return image_id, caption


def copy_file_to_correct_folder(image_id: str):
    file_src_path = f"{config.IMAGE_DATA_DIR}{image_id}"
    file_destination_path = f"asset/test_image/{image_id}"
    shutil.copy(file_src_path, file_destination_path)
image_id, caption = pick_random_test_image(df)
copy_file_to_correct_folder(image_id)
caption<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10649350649350649, 'fraction_numerical': 0.0012987012987012987, 'mean_word_length': 7.202127659574468, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '472641', 'license': 'MIT', 'n_tokens_mistral': 288, 'n_tokens_neox': 284, 'n_words': 44, 'path': 'notebooks/03_prediction_v2.ipynb', 'repo_name': 'msank00/image_caption_gen', 'size': '770'}