robosapiens commited on
Commit
0795c4e
1 Parent(s): afa1d27

gradio slider added

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -19,7 +19,7 @@ def preprocess(raw):
19
 
20
  def analyze(img):
21
  modified_image = preprocess(img)
22
- n_cluster = 6
23
 
24
  clf = KMeans(n_clusters = n_cluster)
25
  color_labels = clf.fit_predict(modified_image)
 
19
 
20
  def analyze(img):
21
  modified_image = preprocess(img)
22
+ n_cluster = gr.inputs.Slider(minimum=2, maximum=10, step=1, label="Number of claster")
23
 
24
  clf = KMeans(n_clusters = n_cluster)
25
  color_labels = clf.fit_predict(modified_image)