gradio/demo/image_mod/run.py
Dawood Khan 7030a2a6cf
Fix example image thumbnail size (#1627)
* fix example image thumbnail size

* format

* remove cache examples

* add classes to token.css

* add small image
2022-07-01 01:27:35 -04:00

18 lines
484 B
Python

import gradio as gr
import os
def image_mod(image):
return image.rotate(45)
demo = gr.Interface(image_mod, gr.inputs.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")
])
if __name__ == "__main__":
demo.launch()