Spaces:
Sleeping
Sleeping
Commit
·
f4c1e61
1
Parent(s):
d03fbaa
add dropdown for split_name
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ print(f"Initializing data plotter...")
|
|
25 |
data_plotter = MatplotlibDataPlotter(single_df, pair_df, num_domains_in_region_df)
|
26 |
|
27 |
|
28 |
-
def update_all_plots(frequency, split_name
|
29 |
return data_plotter.plot_single_domains(frequency, split_name), data_plotter.plot_pair_domains(frequency, split_name)
|
30 |
|
31 |
|
@@ -45,6 +45,12 @@ with gr.Blocks(title="Interactive Wave Plotter") as demo:
|
|
45 |
)
|
46 |
|
47 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
with gr.Column():
|
49 |
single_domains_plot = gr.Plot(
|
50 |
label="Single domains",
|
@@ -66,7 +72,7 @@ with gr.Blocks(title="Interactive Wave Plotter") as demo:
|
|
66 |
|
67 |
frequency_slider.release(
|
68 |
fn=update_all_plots,
|
69 |
-
inputs=[frequency_slider],
|
70 |
outputs=[single_domains_plot, pair_domains_plot]#, cosine_plot]
|
71 |
)
|
72 |
|
|
|
25 |
data_plotter = MatplotlibDataPlotter(single_df, pair_df, num_domains_in_region_df)
|
26 |
|
27 |
|
28 |
+
def update_all_plots(frequency, split_name):
|
29 |
return data_plotter.plot_single_domains(frequency, split_name), data_plotter.plot_pair_domains(frequency, split_name)
|
30 |
|
31 |
|
|
|
45 |
)
|
46 |
|
47 |
with gr.Row():
|
48 |
+
with gr.Column():
|
49 |
+
split_selector = gr.Dropdown(
|
50 |
+
choices=["stratified"] + BIOSYN_CLASS_NAMES,
|
51 |
+
value="stratified",
|
52 |
+
label="Split name"
|
53 |
+
)
|
54 |
with gr.Column():
|
55 |
single_domains_plot = gr.Plot(
|
56 |
label="Single domains",
|
|
|
72 |
|
73 |
frequency_slider.release(
|
74 |
fn=update_all_plots,
|
75 |
+
inputs=[frequency_slider, split_selector],
|
76 |
outputs=[single_domains_plot, pair_domains_plot]#, cosine_plot]
|
77 |
)
|
78 |
|