gradio/demo/image_mod/run.py

11 lines
190 B
Python
Raw Normal View History

2020-08-20 05:27:22 +08:00
import gradio as gr
2020-08-20 05:27:22 +08:00
def image_mod(image):
2020-08-22 05:20:05 +08:00
return image.rotate(45)
2020-08-20 05:27:22 +08:00
2021-10-23 06:23:30 +08:00
iface = gr.Interface(image_mod, gr.inputs.Image(type="pil"), "image")
if __name__ == "__main__":
2020-11-11 22:15:53 +08:00
iface.launch()