Commit
Β·
f58dfa9
1
Parent(s):
4ae75b0
Add app.py with theme changes
Browse files
app.py
CHANGED
|
@@ -34,17 +34,17 @@ def plot_max_margin_hyperplane():
|
|
| 34 |
|
| 35 |
heading = 'π€π§‘π€π SGD: Maximum Margin Separating Hyperplane'
|
| 36 |
|
| 37 |
-
with gr.Blocks(title = heading) as demo:
|
| 38 |
gr.Markdown("# {}".format(heading))
|
| 39 |
gr.Markdown(
|
| 40 |
"""
|
| 41 |
-
|
| 42 |
a two-class separable dataset using a linear SVM classifier trained using SGD.
|
| 43 |
"""
|
| 44 |
)
|
| 45 |
-
gr.Markdown('Demo is based on [this script](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_separating_hyperplane.html#sphx-glr-auto-examples-linear-model-plot-sgd-separating-hyperplane-py)')
|
| 46 |
|
| 47 |
-
button = gr.Button(value = 'Visualize
|
| 48 |
button.click(plot_max_margin_hyperplane, outputs = gr.Plot())
|
| 49 |
|
| 50 |
demo.launch()
|
|
|
|
| 34 |
|
| 35 |
heading = 'π€π§‘π€π SGD: Maximum Margin Separating Hyperplane'
|
| 36 |
|
| 37 |
+
with gr.Blocks(title = heading, theme = 'snehilsanyal/scikit-learn') as demo:
|
| 38 |
gr.Markdown("# {}".format(heading))
|
| 39 |
gr.Markdown(
|
| 40 |
"""
|
| 41 |
+
### This demo visualizes the maximum margin hyperplane that seperates\
|
| 42 |
a two-class separable dataset using a linear SVM classifier trained using SGD.
|
| 43 |
"""
|
| 44 |
)
|
| 45 |
+
gr.Markdown('Demo is based on [this script from scikit-learn documentation](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_separating_hyperplane.html#sphx-glr-auto-examples-linear-model-plot-sgd-separating-hyperplane-py)')
|
| 46 |
|
| 47 |
+
button = gr.Button(value = 'Visualize Maximum Margin Hyperplane')
|
| 48 |
button.click(plot_max_margin_hyperplane, outputs = gr.Plot())
|
| 49 |
|
| 50 |
demo.launch()
|