<jupyter_start><jupyter_text>Compound Widget<jupyter_code>import pathlib
import time

import numpy as np
import ipywidgets
import IPython
import image_attendant as ia

import ipyevents

import numpy_image_widget as niw
from numpy_image_widget import monotext_widget<jupyter_output><empty_output><jupyter_text>Load image data<jupyter_code>folder = pathlib.Path('./images/').resolve()
files = list(folder.glob('*_small.jpg'))
files = sorted(files)
files = files + files[::-1]

images = []
for f in files:

    images.append(ia.read(f))<jupyter_output><empty_output><jupyter_text>Display<jupyter_code>len(images)
wid_img = niw.NumpyImage(images[0], compound=True)
wid_img<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11174785100286533, 'fraction_numerical': 0.0028653295128939827, 'mean_word_length': 8.32, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '653354', 'license': 'MIT', 'n_tokens_mistral': 256, 'n_tokens_neox': 254, 'n_words': 47, 'path': 'notebooks/03 - compound.ipynb', 'repo_name': 'Who8MyLunch/Numpy_Image_Widget', 'size': '698'}