EduardoPacheco
commited on
Commit
•
ca9b69c
1
Parent(s):
2557d28
Event listener
Browse files
app.py
CHANGED
@@ -86,14 +86,15 @@ with gr.Blocks(title=title) as demo:
|
|
86 |
)
|
87 |
|
88 |
with gr.Row():
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
max_depth = gr.inputs.Slider(1, 10, 1, label="Max Depth", default=3)
|
93 |
-
btn = gr.Button("Run")
|
94 |
-
plot = gr.Plot(label="ROC Curve")
|
95 |
|
96 |
-
|
|
|
|
|
|
|
|
|
97 |
demo.load(fn=app_fn, inputs=[n_samples, n_estimators, max_depth], outputs=[plot])
|
98 |
|
99 |
demo.launch()
|
|
|
86 |
)
|
87 |
|
88 |
with gr.Row():
|
89 |
+
n_samples = gr.inputs.Slider(50_000, 100_000, 1000, label="Number of Samples", default=80_000)
|
90 |
+
n_estimators = gr.inputs.Slider(10, 100, 10, label="Number of Estimators", default=10)
|
91 |
+
max_depth = gr.inputs.Slider(1, 10, 1, label="Max Depth", default=3)
|
|
|
|
|
|
|
92 |
|
93 |
+
plot = gr.Plot(label="ROC Curve")
|
94 |
+
|
95 |
+
n_samples.change(fn=app_fn, inputs=[n_samples, n_estimators, max_depth], outputs=[plot])
|
96 |
+
n_estimators.change(fn=app_fn, inputs=[n_samples, n_estimators, max_depth], outputs=[plot])
|
97 |
+
max_depth.change(fn=app_fn, inputs=[n_samples, n_estimators, max_depth], outputs=[plot])
|
98 |
demo.load(fn=app_fn, inputs=[n_samples, n_estimators, max_depth], outputs=[plot])
|
99 |
|
100 |
demo.launch()
|