meg HF staff commited on
Commit
8c42faf
1 Parent(s): 8756f03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -32,13 +32,12 @@ with gr.Blocks() as demo:
32
  num_clusters = gr.Radio([12, 24, 48], label="number of clusters")
33
  cluster_id = gr.Number(precision=0, label="cluster id")
34
  button = gr.Button(value="Go")
35
- gallery = gr.Gallery(label="Most representative images in cluster").style(grid=6)
36
- button.click(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
37
  with gr.Column():
 
38
  a = gr.Text(label="Number of items in cluster")
39
  with gr.Row():
40
  c = gr.Text(label="Model makeup of cluster")
41
  b = gr.Text(label="Gender label makeup of cluster")
42
  d = gr.Text(label="Ethnicity label makeup of cluster")
43
- # demo = gr.Interface(fn=show_cluster, inputs=[gr.Slider(0, 50), gr.Radio([12, 24, 48])], outputs=["text", "text", "text", "text", gr.Gallery()])
44
  demo.launch(debug=True)
 
32
  num_clusters = gr.Radio([12, 24, 48], label="number of clusters")
33
  cluster_id = gr.Number(precision=0, label="cluster id")
34
  button = gr.Button(value="Go")
 
 
35
  with gr.Column():
36
+ gallery = gr.Gallery(label="Most representative images in cluster").style(grid=6)
37
  a = gr.Text(label="Number of items in cluster")
38
  with gr.Row():
39
  c = gr.Text(label="Model makeup of cluster")
40
  b = gr.Text(label="Gender label makeup of cluster")
41
  d = gr.Text(label="Ethnicity label makeup of cluster")
42
+ button.click(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
43
  demo.launch(debug=True)