import gradio as gr def image_mod(image): return image.rotate(45) iface = gr.Interface(image_mod, gr.Image(type="pil"), "image") iface.launch()