Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
|
|
3 |
def greet(name, intensity):
|
4 |
return "Hello " + name * intensity + "!"
|
5 |
|
@@ -10,3 +12,25 @@ demo = gr.Interface(
|
|
10 |
)
|
11 |
|
12 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
|
4 |
+
"""
|
5 |
def greet(name, intensity):
|
6 |
return "Hello " + name * intensity + "!"
|
7 |
|
|
|
12 |
)
|
13 |
|
14 |
demo.launch()
|
15 |
+
"""
|
16 |
+
|
17 |
+
def image_mod(image):
|
18 |
+
return image.rotate(45)
|
19 |
+
|
20 |
+
|
21 |
+
demo = gr.Interface(
|
22 |
+
image_mod,
|
23 |
+
gr.Image(type="pil"),
|
24 |
+
"image",
|
25 |
+
flagging_options=["blurry", "incorrect", "other"],
|
26 |
+
examples=[
|
27 |
+
os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg"),
|
28 |
+
os.path.join(os.path.dirname(__file__), "images/lion.jpg"),
|
29 |
+
os.path.join(os.path.dirname(__file__), "images/logo.png"),
|
30 |
+
os.path.join(os.path.dirname(__file__), "images/tower.jpg"),
|
31 |
+
],
|
32 |
+
)
|
33 |
+
|
34 |
+
if __name__ == "__main__":
|
35 |
+
demo.launch()
|
36 |
+
|