Update app.py
Browse files
app.py
CHANGED
@@ -93,19 +93,20 @@ with gr.Blocks(title=title, theme=theme) as demo:
|
|
93 |
to group together features that look very similar, thus decreasing the number of features. It is a dimensionality reduction \
|
94 |
tool, see [Unsupervised dimensionality reduction](https://scikit-learn.org/stable/modules/unsupervised_reduction.html#data-reduction)."
|
95 |
)
|
96 |
-
n_clusters = gr.Slider(
|
97 |
-
minimum=10,
|
98 |
-
maximum=50,
|
99 |
-
label="Number of clusters",
|
100 |
-
info="Number of clusters for FeatureAgglomeration",
|
101 |
-
step=1,
|
102 |
-
value=32,
|
103 |
-
)
|
104 |
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
-
sub_btn.click(fn=do_submit, inputs=[n_clusters], outputs=[plt_out])
|
109 |
|
110 |
|
111 |
if __name__ == "__main__":
|
|
|
93 |
to group together features that look very similar, thus decreasing the number of features. It is a dimensionality reduction \
|
94 |
tool, see [Unsupervised dimensionality reduction](https://scikit-learn.org/stable/modules/unsupervised_reduction.html#data-reduction)."
|
95 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
+
with gr.Row():
|
98 |
+
n_clusters = gr.Slider(
|
99 |
+
minimum=10,
|
100 |
+
maximum=50,
|
101 |
+
label="Number of clusters",
|
102 |
+
info="Number of clusters for FeatureAgglomeration",
|
103 |
+
step=1,
|
104 |
+
value=32,
|
105 |
+
)
|
106 |
+
|
107 |
+
plt_out = gr.Plot()
|
108 |
+
n_clusters.change(do_submit, n_clusters, plt_out)
|
109 |
|
|
|
110 |
|
111 |
|
112 |
if __name__ == "__main__":
|