mralamdari commited on
Commit
08481e3
·
1 Parent(s): 52bf8bd

Create app.py

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