Spaces:
Build error
Build error
Commit ·
048cde5
1
Parent(s): c911131
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,24 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
def greet(name):
|
| 4 |
-
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|
| 24 |
+
|