Spaces:
Running
Running
Organize the examples
Browse files
app.py
CHANGED
@@ -61,20 +61,16 @@ with gr.Blocks() as demo:
|
|
61 |
query_input = gr.Textbox(label="Sisestage teie otsingupäring")
|
62 |
search_button = gr.Button("Otsi")
|
63 |
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
66 |
|
67 |
results_output = gr.Dataframe(label="Otsingutulemused")
|
68 |
|
69 |
search_button.click(search_query, inputs=query_input, outputs=results_output)
|
70 |
|
71 |
-
for button in example_buttons:
|
72 |
-
button.click(
|
73 |
-
handle_example,
|
74 |
-
inputs=gr.State(button.value),
|
75 |
-
outputs=[query_input, results_output],
|
76 |
-
)
|
77 |
-
|
78 |
|
79 |
if __name__ == "__main__":
|
80 |
demo.launch()
|
|
|
61 |
query_input = gr.Textbox(label="Sisestage teie otsingupäring")
|
62 |
search_button = gr.Button("Otsi")
|
63 |
|
64 |
+
gr.Examples(
|
65 |
+
examples=examples,
|
66 |
+
inputs=query_input,
|
67 |
+
label="Otsi päringunäiteid"
|
68 |
+
)
|
69 |
|
70 |
results_output = gr.Dataframe(label="Otsingutulemused")
|
71 |
|
72 |
search_button.click(search_query, inputs=query_input, outputs=results_output)
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
if __name__ == "__main__":
|
76 |
demo.launch()
|