mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
503a67aa9d
* 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>
23 lines
422 B
Python
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()
|