gradio/demo/image_mod/run.py
aliabid94 5bd42feb8c
Frontend fixes (#3026)
* fixes

* changes

* change

* changes
2023-01-20 13:24:24 -08:00

24 lines
561 B
Python

import gradio as gr
import os
def image_mod(image):
return image.rotate(45)
demo = gr.Interface(
image_mod,
gr.Image(type="pil"),
"image",
flagging_options=["blurry", "incorrect", "other"],
examples=[
os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg"),
os.path.join(os.path.dirname(__file__), "images/lion.jpg"),
os.path.join(os.path.dirname(__file__), "images/logo.png"),
os.path.join(os.path.dirname(__file__), "images/tower.jpg"),
],
)
if __name__ == "__main__":
demo.launch()