Spaces:
Sleeping
Sleeping
Commit
·
a44de79
1
Parent(s):
1fef923
Update app.py
Browse files
app.py
CHANGED
@@ -118,6 +118,7 @@ with gr.Blocks(title=title, theme=gr.themes.Default(font=[gr.themes.GoogleFont("
|
|
118 |
|
119 |
|
120 |
r = 0.1
|
|
|
121 |
real_cov = toeplitz(r ** np.arange(n_features))
|
122 |
coloring_matrix = cholesky(real_cov)
|
123 |
gr.Markdown(" **[Demo is based on sklearn docs](https://scikit-learn.org/stable/auto_examples/covariance/plot_lw_vs_oas.html)**")
|
@@ -126,13 +127,16 @@ with gr.Blocks(title=title, theme=gr.themes.Default(font=[gr.themes.GoogleFont("
|
|
126 |
# output = gr.Textbox(label="Output Box")
|
127 |
# greet_btn.click(fn=greet, inputs=name, outputs=output)
|
128 |
gr.Label(value="Comparison of Covariance Estimators")
|
129 |
-
|
130 |
-
|
|
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
|
|
136 |
|
137 |
|
138 |
demo.launch()
|
|
|
118 |
|
119 |
|
120 |
r = 0.1
|
121 |
+
changed = False
|
122 |
real_cov = toeplitz(r ** np.arange(n_features))
|
123 |
coloring_matrix = cholesky(real_cov)
|
124 |
gr.Markdown(" **[Demo is based on sklearn docs](https://scikit-learn.org/stable/auto_examples/covariance/plot_lw_vs_oas.html)**")
|
|
|
127 |
# output = gr.Textbox(label="Output Box")
|
128 |
# greet_btn.click(fn=greet, inputs=name, outputs=output)
|
129 |
gr.Label(value="Comparison of Covariance Estimators")
|
130 |
+
if min_slider_samples_range and changed = False:
|
131 |
+
min_slider_samples_range.change(generate_plots, inputs=[min_slider_samples_range,max_slider_samples_range], outputs= gr.Plot() )
|
132 |
+
changed =True
|
133 |
|
134 |
+
elif max_slider_samples_range and changed = False:
|
135 |
+
max_slider_samples_range.change(generate_plots, inputs=[min_slider_samples_range,max_slider_samples_range], outputs= gr.Plot() )
|
136 |
+
changed = True
|
137 |
+
|
138 |
+
else:
|
139 |
+
pass
|
140 |
|
141 |
|
142 |
demo.launch()
|