Commit
·
a79cd47
1
Parent(s):
b9d61a6
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import numpy as np
|
| 3 |
+
import matplotlib.pyplot as plt
|
| 4 |
+
from sklearn.model_selection import train_test_split
|
| 5 |
+
from sklearn.datasets import load_breast_cancer
|
| 6 |
+
from sklearn.tree import DecisionTreeClassifier
|
| 7 |
+
|
| 8 |
+
theme = gr.themes.Monochrome(
|
| 9 |
+
primary_hue="indigo",
|
| 10 |
+
secondary_hue="blue",
|
| 11 |
+
neutral_hue="slate",
|
| 12 |
+
)
|
| 13 |
+
|
| 14 |
+
description = f"""
|
| 15 |
+
## Description
|
| 16 |
+
This demo can be used to evaluate the ability of k-means initializations strategies to make the algorithm convergence robust
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
with gr.Blocks(theme=theme) as demo:
|
| 20 |
+
gr.Markdown('''
|
| 21 |
+
<div>
|
| 22 |
+
<h1 style='text-align: center'>Empirical evaluation of the impact of k-means initialization 📊</h1>
|
| 23 |
+
</div>
|
| 24 |
+
''')
|
| 25 |
+
gr.Markdown(description)
|
| 26 |
+
|
| 27 |
+
demo.launch()
|