awacke1 commited on
Commit
069384f
·
1 Parent(s): 4bc29a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -1
app.py CHANGED
@@ -7,4 +7,32 @@ def video_flip(video):
7
 
8
  demo = gr.Interface(video_flip, gr.Video(), "playable_video")
9
 
10
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  demo = gr.Interface(video_flip, gr.Video(), "playable_video")
9
 
10
+ #import gradio as gr
11
+
12
+
13
+ def sentence_builder(quantity, animal, place, activity_list, morning):
14
+ return f"""The {quantity} {animal}s went to the {place} where they {" and ".join(activity_list)} until the {"morning" if morning else "night"}"""
15
+
16
+
17
+ demo2 = gr.Interface(
18
+ sentence_builder,
19
+ [
20
+ gr.Slider(2, 20),
21
+ gr.Dropdown(["cat", "dog", "bird"]),
22
+ gr.Radio(["park", "zoo", "road"]),
23
+ gr.CheckboxGroup(["ran", "swam", "ate", "slept"]),
24
+ gr.Checkbox(label="Is it the morning?"),
25
+ ],
26
+ "text",
27
+ examples=[
28
+ [2, "cat", "park", ["ran", "swam"], True],
29
+ [4, "dog", "zoo", ["ate", "swam"], False],
30
+ [10, "bird", "road", ["ran"], False],
31
+ [8, "cat", "zoo", ["ate"], True],
32
+ ],
33
+ )
34
+
35
+
36
+
37
+ #demo.launch()
38
+ demo2.launch()