gradio/demo/image_mod.py
aliabid94 503a67aa9d Allow for bulk input from examples (#74)
* bulk input first commit

* add titanic demo support

* remove flagged content

* route vendor files through gradio.app if share=True; cache bust other static files

* s

* navigate examples with arrow keys

* navigate examples with arrow keys

* navigate examples with arrow keys

Co-authored-by: Ali Abid <aliabid94@gmail.com>
2020-11-04 07:38:48 -08:00

23 lines
422 B
Python

# Demo: (Image) -> (Image)
import gradio as gr
def image_mod(image):
return image.rotate(45)
io = gr.Interface(image_mod,
gr.inputs.Image(type="pil"),
"image",
examples=[
["images/cheetah1.jpg"],
["images/cheetah2.jpg"],
["images/lion.jpg"],
])
io.test_launch()
if __name__ == "__main__":
io.launch()