John Smith commited on
Commit
9c47ef4
·
1 Parent(s): 2cfa253

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -15
app.py CHANGED
@@ -1,25 +1,22 @@
1
  import gradio as gr
 
2
 
3
 
4
- def sentence_builder(quantity, animal):
5
- return f"""The {quantity} {animal}s from went to the where they until the """
6
 
7
 
8
  demo = gr.Interface(
9
- sentence_builder,
10
- [
11
- gr.Slider(2009, 2023, value=2009, label="Count", info="Choose a year between 2009 and 2023"),
12
- gr.Slider(0, 120167, value=0, label="Count", info="Enter mileage between 0 and 120167"),
13
-
14
-
 
 
 
15
  ],
16
- "text",
17
- #examples=[
18
- # [2, "cat", ["Japan", "Pakistan"], "park", ["ate", "swam"], True],
19
- # [4, "dog", ["Japan"], "zoo", ["ate", "swam"], False],
20
- # [10, "bird", ["USA", "Pakistan"], "road", ["ran"], False],
21
- # [8, "cat", ["Pakistan"], "zoo", ["ate"], True],
22
- #]
23
  )
24
 
25
  if __name__ == "__main__":
 
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__":