Update app.py
Browse files
app.py
CHANGED
@@ -25,6 +25,7 @@ def make_plot(plot_type, refresh=False):
|
|
25 |
global ratio_df, melted_df
|
26 |
|
27 |
if refresh:
|
|
|
28 |
ratio_df, melted_df = get_data()
|
29 |
|
30 |
if plot_type == "Total models with missing 'transformers' tag":
|
@@ -88,7 +89,7 @@ with gr.Blocks() as demo:
|
|
88 |
plot = gr.Plot(label="Plot")
|
89 |
|
90 |
button.change(make_plot, inputs=[button], outputs=[plot])
|
91 |
-
refresh_button.click(partial(make_plot, True), inputs=[button], outputs=[plot])
|
92 |
demo.load(make_plot, inputs=[button], outputs=[plot])
|
93 |
|
94 |
if __name__ == "__main__":
|
|
|
25 |
global ratio_df, melted_df
|
26 |
|
27 |
if refresh:
|
28 |
+
|
29 |
ratio_df, melted_df = get_data()
|
30 |
|
31 |
if plot_type == "Total models with missing 'transformers' tag":
|
|
|
89 |
plot = gr.Plot(label="Plot")
|
90 |
|
91 |
button.change(make_plot, inputs=[button], outputs=[plot])
|
92 |
+
refresh_button.click(partial(make_plot, refresh=True), inputs=[button], outputs=[plot])
|
93 |
demo.load(make_plot, inputs=[button], outputs=[plot])
|
94 |
|
95 |
if __name__ == "__main__":
|