Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/cheetah1.jpg"),
|
16 |
+
os.path.join(os.path.dirname(__file__), "images/lion.jpg"),
|
17 |
+
os.path.join(os.path.dirname(__file__), "images/logo.png"),
|
18 |
+
os.path.join(os.path.dirname(__file__), "images/tower.jpg"),
|
19 |
+
],
|
20 |
+
)
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
demo.launch()
|