A newer version of the Gradio SDK is available:
5.29.0
COPAINT
TLDR: From generated Image -> Copaint PDF
Usage and Install
# Install dependencies
poetry install --with ui
# Run Gradio App on local server
poetry run copaint-app
Alternative Usage and Install (CLI)
# Install dependencies
pip install torch torchvision reportlab PyPDF2 Pillow argparse gradio_pdf
# Run
python copaint.py --input_image data/bear.jpg --copaint_logo data/logo_copaint.jpg --outputfolder output
# Using the CLI
pip install --upgrade pip
pip install -e .
# Case 1 : generate all the presets
copaint --input_image data/bear.jpg --copaint_logo data/logo_copaint.jpg --outputfolder output --use_presets True
# Case 2 : provide a number of participants, the program will generate the best grid
copaint --input_image data/bear.jpg --copaint_logo data/logo_copaint.jpg --outputfolder output --nparticipants 45
# Case 3 : provide the number of cells in the grid
copaint --input_image data/bear.jpg --copaint_logo data/logo_copaint.jpg --outputfolder output --h_cells 3 --w_cells 4
Build and deploy
# Build
poetry build
# Deploy
poetry publish