from PIL import Image from .process_images import make_img_html class ExamplesHandler: def __init__(self, examples): self.examples = examples def to_html(self): ret = "" for i, (img_path, category) in enumerate(self.examples): ret += f"" ret += "
" return ret