Spaces:
Runtime error
Runtime error
Download app.py from nikkmeffley/SplashLand: direct link, hf CLI and curl.
- Browser
- Download file 846 Bytes
-
https://huggingface.co/spaces/nikkmeffley/SplashLand/resolve/main/app.py
- Command line
-
hf download hf://spaces/nikkmeffley/SplashLand/app.py
-
curl -L -o app.py https://huggingface.co/spaces/nikkmeffley/SplashLand/resolve/main/app.py
846 Bytes
| import gradio as gr | |
| from paintify import stylize_image | |
| def process(image): | |
| output = stylize_image(image) | |
| return image, output | |
| with gr.Blocks(title="MSPaintify") as demo: | |
| gr.Markdown("## 🎨 MSPaintify: Turn any image into a crude MS Paint-style masterpiece") | |
| with gr.Row(): | |
| with gr.Column(): | |
| input_img = gr.Image(label="Upload Image", type="pil") | |
| submit_btn = gr.Button("Convert to MS Paint Style") | |
| with gr.Column(): | |
| original = gr.Image(label="Original", interactive=False) | |
| result = gr.Image(label="Stylized", interactive=False) | |
| download_btn = gr.Button("Download") | |
| submit_btn.click(fn=process, inputs=input_img, outputs=[original, result]) | |
| download_btn.click(lambda img: img, inputs=result, outputs=gr.File(label="Download")) | |
| demo.launch() | |