from minio import Minio
import os
from typing import Optional
from glob import glob
import pathlib
from sqlmodel import Field, Session, SQLModel, create_engine

def get_images(folder:str="../cls_labeling/public/images"):
    return glob(str(pathlib.Path(folder,"**","*.jpg")), recursive=True)


class Image(SQLModel, table=True):
    key: Optional[int] = Field(default=None, primary_key=True)
    image_name: str
    label: str
    image_url: str


if __name__ == "__main__":
    engine = 