Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,7 +194,7 @@ with gr.Blocks() as demo:
|
|
| 194 |
|
| 195 |
# Compare Anomaly Detection Algorithms
|
| 196 |
gr.Markdown("### 2. Compare Anomaly Detection Algorithms")
|
| 197 |
-
outliers_fraction = gr.Slider(minimum=0.001, maximum=0.999, step=0.1, value=0.
|
| 198 |
input_models = ["Robust covariance", "One-Class SVM", "One-Class SVM (SGD)", "Isolation Forest", "Local Outlier Factor"]
|
| 199 |
plots = []
|
| 200 |
with gr.Row():
|
|
@@ -215,6 +215,7 @@ with gr.Blocks() as demo:
|
|
| 215 |
n_samples.change(fn=update_anomaly_comparison, inputs=anomaly_inputs, outputs=anomaly_outputs)
|
| 216 |
outliers_fraction.change(fn=update_anomaly_comparison, inputs=anomaly_inputs, outputs=anomaly_outputs)
|
| 217 |
|
|
|
|
| 218 |
# Example Anomaly Records
|
| 219 |
gr.Markdown("### 3. Example Anomaly Records")
|
| 220 |
model_dropdown = gr.Dropdown(choices=input_models, value="Isolation Forest", label="Select Model")
|
|
@@ -228,5 +229,5 @@ with gr.Blocks() as demo:
|
|
| 228 |
inputs=[input_data, n_samples, outliers_fraction, model_dropdown],
|
| 229 |
outputs=[top_table, middle_table, bottom_table],
|
| 230 |
)
|
| 231 |
-
|
| 232 |
demo.launch(debug=True)
|
|
|
|
| 194 |
|
| 195 |
# Compare Anomaly Detection Algorithms
|
| 196 |
gr.Markdown("### 2. Compare Anomaly Detection Algorithms")
|
| 197 |
+
outliers_fraction = gr.Slider(minimum=0.001, maximum=0.999, step=0.1, value=0.01, label="Fraction of Outliers")
|
| 198 |
input_models = ["Robust covariance", "One-Class SVM", "One-Class SVM (SGD)", "Isolation Forest", "Local Outlier Factor"]
|
| 199 |
plots = []
|
| 200 |
with gr.Row():
|
|
|
|
| 215 |
n_samples.change(fn=update_anomaly_comparison, inputs=anomaly_inputs, outputs=anomaly_outputs)
|
| 216 |
outliers_fraction.change(fn=update_anomaly_comparison, inputs=anomaly_inputs, outputs=anomaly_outputs)
|
| 217 |
|
| 218 |
+
'''
|
| 219 |
# Example Anomaly Records
|
| 220 |
gr.Markdown("### 3. Example Anomaly Records")
|
| 221 |
model_dropdown = gr.Dropdown(choices=input_models, value="Isolation Forest", label="Select Model")
|
|
|
|
| 229 |
inputs=[input_data, n_samples, outliers_fraction, model_dropdown],
|
| 230 |
outputs=[top_table, middle_table, bottom_table],
|
| 231 |
)
|
| 232 |
+
'''
|
| 233 |
demo.launch(debug=True)
|