# COPAINT | |
TLDR: From generated Image -> Copaint PDF | |
<!-- insert image data/demo.png --> | |
[](data/demo.jpg) | |
## Usage and Install | |
``` | |
# 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 | |
``` |