Spaces:
Sleeping
Sleeping
minor
Browse files
app.py
CHANGED
@@ -89,7 +89,8 @@ a {
|
|
89 |
align-items: baseline;
|
90 |
}
|
91 |
.bottomButton::before {
|
92 |
-
content: 'tags
|
|
|
93 |
}
|
94 |
.buttonsGroup {
|
95 |
background: transparent;
|
@@ -139,7 +140,7 @@ def search_datasets(search_query):
|
|
139 |
|
140 |
def show_dataset(*buttons_values, i):
|
141 |
dataset_name, tags = buttons_values[2 * i : 2 * i + 2]
|
142 |
-
return f"{dataset_name=}, {tags=}"
|
143 |
|
144 |
|
145 |
with gr.Blocks(css=css) as demo:
|
@@ -156,7 +157,8 @@ with gr.Blocks(css=css) as demo:
|
|
156 |
search_button = gr.Button("🔍", variant="primary")
|
157 |
with gr.Column(scale=4, min_width=0):
|
158 |
pass
|
159 |
-
|
|
|
160 |
with gr.Row():
|
161 |
with gr.Column(scale=4, min_width=0):
|
162 |
pass
|
@@ -169,8 +171,8 @@ with gr.Blocks(css=css) as demo:
|
|
169 |
top = gr.Button(dataset_name, elem_classes="topButton")
|
170 |
bottom = gr.Button(tags, elem_classes="bottomButton")
|
171 |
buttons += [top, bottom]
|
172 |
-
top.click(partial(show_dataset, i=i), inputs=buttons, outputs=
|
173 |
-
bottom.click(partial(show_dataset, i=i), inputs=buttons, outputs=
|
174 |
with gr.Column(scale=4, min_width=0):
|
175 |
pass
|
176 |
search_bar.submit(search_datasets, inputs=search_bar, outputs=buttons)
|
|
|
89 |
align-items: baseline;
|
90 |
}
|
91 |
.bottomButton::before {
|
92 |
+
content: 'tags:';
|
93 |
+
margin-right: .25rem;
|
94 |
}
|
95 |
.buttonsGroup {
|
96 |
background: transparent;
|
|
|
140 |
|
141 |
def show_dataset(*buttons_values, i):
|
142 |
dataset_name, tags = buttons_values[2 * i : 2 * i + 2]
|
143 |
+
return f"TODO: show {dataset_name=}, {tags=}"
|
144 |
|
145 |
|
146 |
with gr.Blocks(css=css) as demo:
|
|
|
157 |
search_button = gr.Button("🔍", variant="primary")
|
158 |
with gr.Column(scale=4, min_width=0):
|
159 |
pass
|
160 |
+
outputs = []
|
161 |
+
outputs.append(gr.Markdown())
|
162 |
with gr.Row():
|
163 |
with gr.Column(scale=4, min_width=0):
|
164 |
pass
|
|
|
171 |
top = gr.Button(dataset_name, elem_classes="topButton")
|
172 |
bottom = gr.Button(tags, elem_classes="bottomButton")
|
173 |
buttons += [top, bottom]
|
174 |
+
top.click(partial(show_dataset, i=i), inputs=buttons, outputs=outputs)
|
175 |
+
bottom.click(partial(show_dataset, i=i), inputs=buttons, outputs=outputs)
|
176 |
with gr.Column(scale=4, min_width=0):
|
177 |
pass
|
178 |
search_bar.submit(search_datasets, inputs=search_bar, outputs=buttons)
|