Spaces:
Sleeping
Sleeping
Test Block
Browse files
app.py
CHANGED
@@ -17,28 +17,21 @@ article = "This is article."
|
|
17 |
def sentence_builder(quantity, animal, countries, place, activity_list, morning):
|
18 |
return f"""The {quantity} {animal}s from {" and ".join(countries)} went to the {place} where they {" and ".join(activity_list)} until the {"morning" if morning else "night"}"""
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
gr.
|
24 |
-
gr.Dropdown(
|
25 |
-
|
26 |
-
)
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
gr.
|
33 |
-
|
34 |
-
|
35 |
-
examples=[
|
36 |
-
[2, "cat", ["Japan", "Pakistan"], "park", ["ate", "swam"], True],
|
37 |
-
[4, "dog", ["Japan"], "zoo", ["ate", "swam"], False],
|
38 |
-
[10, "bird", ["USA", "Pakistan"], "road", ["ran"], False],
|
39 |
-
[8, "cat", ["Pakistan"], "zoo", ["ate"], True],
|
40 |
-
]
|
41 |
-
)
|
42 |
|
43 |
demo.launch(debug=False,
|
44 |
share=True)
|
|
|
17 |
def sentence_builder(quantity, animal, countries, place, activity_list, morning):
|
18 |
return f"""The {quantity} {animal}s from {" and ".join(countries)} went to the {place} where they {" and ".join(activity_list)} until the {"morning" if morning else "night"}"""
|
19 |
|
20 |
+
with gr.Blocks() as demo:
|
21 |
+
with gr.Row():
|
22 |
+
text1 = gr.Textbox(label="t1")
|
23 |
+
slider2 = gr.Textbox(label="s2")
|
24 |
+
drop3 = gr.Dropdown(["a", "b", "c"], label="d3")
|
25 |
+
with gr.Row():
|
26 |
+
with gr.Column(scale=1, min_width=300):
|
27 |
+
text1 = gr.Textbox(label="prompt 1")
|
28 |
+
text2 = gr.Textbox(label="prompt 2")
|
29 |
+
inbtw = gr.Button("Between")
|
30 |
+
text4 = gr.Textbox(label="prompt 1")
|
31 |
+
text5 = gr.Textbox(label="prompt 2")
|
32 |
+
with gr.Column(scale=2, min_width=300):
|
33 |
+
img1 = gr.Image("images/cheetah.jpg")
|
34 |
+
btn = gr.Button("Go")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
demo.launch(debug=False,
|
37 |
share=True)
|