Spaces:
Build error
Build error
Download run.py from hmb/image-simple-2: direct link, hf CLI and curl.
- Browser
- Download file 534 Bytes
-
https://huggingface.co/spaces/hmb/image-simple-2/resolve/main/run.py
- Command line
-
hf download hf://spaces/hmb/image-simple-2/run.py
-
curl -L -o run.py https://huggingface.co/spaces/hmb/image-simple-2/resolve/main/run.py
534 Bytes
| import gradio as gr | |
| def process_images(image_list): | |
| # Assume image_list is a list containing two images | |
| image1, image2 = image_list | |
| # For demonstration, let's just return the two images | |
| return image1, image2 | |
| with gr.Blocks() as demo: | |
| file_input = gr.File(label="Upload two images", file_count="multiple") | |
| output_1 = gr.Image() | |
| output_2 = gr.Image() | |
| btn = gr.Button("Submit") | |
| btn.click(process_images, inputs=file_input, outputs=[output_1, output_2]) | |
| if __name__ == "__main__": | |
| demo.launch() |