Spaces:
Runtime error
Runtime error
Eachan Johnson
commited on
Commit
·
c4eec7f
1
Parent(s):
8e992e9
Fix dropdowns
Browse files
app.py
CHANGED
|
@@ -517,7 +517,7 @@ def _initial_setup():
|
|
| 517 |
)
|
| 518 |
download_single = gr.DownloadButton(
|
| 519 |
label="Download predictions",
|
| 520 |
-
visible=
|
| 521 |
)
|
| 522 |
drawing = gr.Image(label="Chemical structures")
|
| 523 |
|
|
@@ -790,24 +790,19 @@ if __name__ == "__main__":
|
|
| 790 |
],
|
| 791 |
)
|
| 792 |
go2_click_event = go_button2.click(
|
| 793 |
-
|
| 794 |
inputs=[
|
| 795 |
-
|
| 796 |
-
file_inputs["column"],
|
| 797 |
-
file_inputs["format"],
|
| 798 |
*file_inputs["species"],
|
| 799 |
file_inputs["extras"],
|
| 800 |
],
|
| 801 |
outputs=[
|
| 802 |
input_dataframe,
|
|
|
|
| 803 |
*plot_dropdowns,
|
| 804 |
],
|
| 805 |
-
)
|
| 806 |
-
|
| 807 |
-
df_change = input_dataframe.change(
|
| 808 |
-
download_table,
|
| 809 |
-
inputs=input_dataframe,
|
| 810 |
-
outputs=download
|
| 811 |
).then(
|
| 812 |
lambda: gr.Button(visible=True),
|
| 813 |
outputs=[plot_button],
|
|
@@ -819,14 +814,6 @@ if __name__ == "__main__":
|
|
| 819 |
outputs=[plot_button],
|
| 820 |
js=True,
|
| 821 |
)
|
| 822 |
-
|
| 823 |
-
for dropdown in plot_dropdowns:
|
| 824 |
-
for e in (file_examples.load_input_event, go2_click_event):
|
| 825 |
-
df_change.then(
|
| 826 |
-
partial(get_dropdown_options, _type="number"),
|
| 827 |
-
inputs=[input_dataframe],
|
| 828 |
-
outputs=[dropdown],
|
| 829 |
-
)
|
| 830 |
|
| 831 |
plot_button.click(
|
| 832 |
plot_pred_vs_observed,
|
|
|
|
| 517 |
)
|
| 518 |
download_single = gr.DownloadButton(
|
| 519 |
label="Download predictions",
|
| 520 |
+
visible=True,
|
| 521 |
)
|
| 522 |
drawing = gr.Image(label="Chemical structures")
|
| 523 |
|
|
|
|
| 790 |
],
|
| 791 |
)
|
| 792 |
go2_click_event = go_button2.click(
|
| 793 |
+
_load_then_predict_then_download_then_reveal_plot,
|
| 794 |
inputs=[
|
| 795 |
+
file_inputs["file"],
|
| 796 |
+
file_inputs["column"],
|
| 797 |
+
file_inputs["format"],
|
| 798 |
*file_inputs["species"],
|
| 799 |
file_inputs["extras"],
|
| 800 |
],
|
| 801 |
outputs=[
|
| 802 |
input_dataframe,
|
| 803 |
+
download,
|
| 804 |
*plot_dropdowns,
|
| 805 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 806 |
).then(
|
| 807 |
lambda: gr.Button(visible=True),
|
| 808 |
outputs=[plot_button],
|
|
|
|
| 814 |
outputs=[plot_button],
|
| 815 |
js=True,
|
| 816 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 817 |
|
| 818 |
plot_button.click(
|
| 819 |
plot_pred_vs_observed,
|