Spaces:
Sleeping
Sleeping
Commit
•
b2a0b3c
1
Parent(s):
5901238
Use blocks instead of interface
Browse files
app.py
CHANGED
@@ -73,16 +73,15 @@ scheduler.add_job(update_datasets, trigger="cron", hour=0, minute=1, timezone=da
|
|
73 |
scheduler.start()
|
74 |
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
gr.Dropdown(choices=dates, label="Date
|
80 |
-
gr.
|
81 |
-
|
82 |
-
outputs=gr.Dataframe(
|
83 |
headers=["Dataset", "Downloads"],
|
84 |
datatype=["str", "number"],
|
85 |
label="Created datasets",
|
86 |
-
)
|
87 |
-
)
|
88 |
demo.launch()
|
|
|
73 |
scheduler.start()
|
74 |
|
75 |
|
76 |
+
with gr.Blocks() as demo:
|
77 |
+
with gr.Row():
|
78 |
+
date_from = gr.Dropdown(choices=dates, label="Date from")
|
79 |
+
date_to = gr.Dropdown(choices=dates, label="Date to")
|
80 |
+
submit_btn = gr.Button("Submit")
|
81 |
+
outputs = gr.Dataframe(
|
|
|
82 |
headers=["Dataset", "Downloads"],
|
83 |
datatype=["str", "number"],
|
84 |
label="Created datasets",
|
85 |
+
)
|
86 |
+
submit_btn.click(fn=filter_dataframe, inputs=[date_from, date_to], outputs=outputs)
|
87 |
demo.launch()
|