gradio/demo/image_mod.py
2021-10-22 15:23:30 -07:00

14 lines
246 B
Python

import gradio as gr
def image_mod(image):
if image is None:
return "images/lion.jpg"
return image.rotate(45)
iface = gr.Interface(image_mod, gr.inputs.Image(type="pil"), "image")
if __name__ == "__main__":
iface.launch()