Update app.py
Browse files
app.py
CHANGED
@@ -53,8 +53,8 @@ with gr.Blocks() as demo:
|
|
53 |
|
54 |
gr.Markdown("### Feel free to experiment with kernel and gamma values below to see how the quality of the decision function changes with the hyperparameters.")
|
55 |
|
56 |
-
inp1 = gr.Radio(['poly', 'rbf', 'sigmoid'], label="Kernel", info="Choose a kernel")
|
57 |
-
inp2 = gr.Radio(['scale', 'auto'], label="Gamma", info="Choose a gamma value")
|
58 |
|
59 |
with gr.Row():
|
60 |
plot = gr.Plot(label=f"Decision function plot for Non-Linear SVC with the '{inp1}' kernel and '{inp2}' gamma ")
|
@@ -62,6 +62,7 @@ with gr.Blocks() as demo:
|
|
62 |
|
63 |
inp1.change(getColorMap, inputs=[inp1, inp2], outputs=[plot, num])
|
64 |
inp2.change(getColorMap, inputs=[inp1, inp2], outputs=[plot, num])
|
|
|
65 |
|
66 |
gr.HTML("<hr>")
|
67 |
|
|
|
53 |
|
54 |
gr.Markdown("### Feel free to experiment with kernel and gamma values below to see how the quality of the decision function changes with the hyperparameters.")
|
55 |
|
56 |
+
inp1 = gr.Radio(['poly', 'rbf', 'sigmoid'], label="Kernel", info="Choose a kernel", value="poly")
|
57 |
+
inp2 = gr.Radio(['scale', 'auto'], label="Gamma", info="Choose a gamma value", value="scale")
|
58 |
|
59 |
with gr.Row():
|
60 |
plot = gr.Plot(label=f"Decision function plot for Non-Linear SVC with the '{inp1}' kernel and '{inp2}' gamma ")
|
|
|
62 |
|
63 |
inp1.change(getColorMap, inputs=[inp1, inp2], outputs=[plot, num])
|
64 |
inp2.change(getColorMap, inputs=[inp1, inp2], outputs=[plot, num])
|
65 |
+
demo.load(getColorMap, inputs=[inp1, inp2], outputs=[plot, num])
|
66 |
|
67 |
gr.HTML("<hr>")
|
68 |
|