mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
8aba1c991b
* Explicitly set value and add to docs * Fix wording a bit * Remove sentence that's not adding much * Remove extra word * Delete screenshot
19 lines
493 B
Python
19 lines
493 B
Python
import gradio as gr
|
|
import os
|
|
|
|
|
|
def image_mod(image):
|
|
return image.rotate(45)
|
|
|
|
|
|
cheetah = os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg")
|
|
|
|
demo = gr.Interface(image_mod, gr.Image(type="pil", value=cheetah), "image",
|
|
flagging_options=["blurry", "incorrect", "other"], examples=[
|
|
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()
|