Spaces:
Runtime error
Runtime error
meg-huggingface
commited on
Commit
•
0c0c17a
1
Parent(s):
602f686
Finishing for the night
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def show_cluster(cl_id, num_clusters):
|
|
32 |
|
33 |
with gr.Blocks(title=TITLE) as demo:
|
34 |
gr.Markdown(f"# {TITLE}")
|
35 |
-
gr.
|
36 |
gr.HTML("""<span style="color:red" font-size:smaller>⚠️ DISCLAIMER: the images displayed by this tool were generated by text-to-image models and may depict offensive stereotypes or contain explicit content.</span>""")
|
37 |
num_clusters = gr.Radio([12,24,48], value=12, label="How many clusters do you want to make from the data?")
|
38 |
|
@@ -42,13 +42,12 @@ with gr.Blocks(title=TITLE) as demo:
|
|
42 |
with gr.Column():
|
43 |
cluster_id = gr.Slider(minimum=0, maximum=num_clusters.value-1, step=1, value=0, label="Click to move between clusters")
|
44 |
a = gr.Text(label="Number of images")
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
d = gr.Text(label="Ethnicity label makeup of cluster")
|
49 |
demo.load(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
|
50 |
num_clusters.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
|
51 |
cluster_id.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
|
52 |
|
53 |
if __name__ == "__main__":
|
54 |
-
demo.queue().launch(debug=True)
|
|
|
32 |
|
33 |
with gr.Blocks(title=TITLE) as demo:
|
34 |
gr.Markdown(f"# {TITLE}")
|
35 |
+
gr.Markdown("## This Space lets you explore the data generated from [DiffusionBiasExplorer](https://huggingface.co/spaces/society-ethics/DiffusionBiasExplorer).")
|
36 |
gr.HTML("""<span style="color:red" font-size:smaller>⚠️ DISCLAIMER: the images displayed by this tool were generated by text-to-image models and may depict offensive stereotypes or contain explicit content.</span>""")
|
37 |
num_clusters = gr.Radio([12,24,48], value=12, label="How many clusters do you want to make from the data?")
|
38 |
|
|
|
42 |
with gr.Column():
|
43 |
cluster_id = gr.Slider(minimum=0, maximum=num_clusters.value-1, step=1, value=0, label="Click to move between clusters")
|
44 |
a = gr.Text(label="Number of images")
|
45 |
+
c = gr.Text(label="Model makeup of cluster")
|
46 |
+
b = gr.Text(label="Gender label makeup of cluster")
|
47 |
+
d = gr.Text(label="Ethnicity label makeup of cluster")
|
|
|
48 |
demo.load(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
|
49 |
num_clusters.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
|
50 |
cluster_id.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a,b,c,d, gallery])
|
51 |
|
52 |
if __name__ == "__main__":
|
53 |
+
demo.queue().launch(debug=True)
|