hmb HF Staff commited on
Commit
9c38512
·
verified ·
1 Parent(s): dcdf790

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ import gradio as gr
4
+
5
+
6
+ def image_mod(image):
7
+ return image.rotate(45)
8
+
9
+
10
+ cheetah = os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg")
11
+
12
+ demo = gr.Interface(image_mod, gr.Image(type="pil", value=cheetah), "image",
13
+ flagging_options=["blurry", "incorrect", "other"], examples=[
14
+ os.path.join(os.path.dirname(__file__), "images/dog.png"),
15
+ ])
16
+
17
+ if __name__ == "__main__":
18
+ demo.launch(max_file_size="70kb")