Spaces:
Runtime error
Runtime error
Adding little descriptions of results
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def show_cluster(cl_id, num_clusters):
|
|
60 |
|
61 |
with gr.Blocks(title=TITLE) as demo:
|
62 |
gr.Markdown(f"# {TITLE}")
|
63 |
-
gr.Markdown("## This Space lets you explore the data generated from [DiffusionBiasExplorer](https://huggingface.co/spaces/society-ethics/DiffusionBiasExplorer).")
|
64 |
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>""")
|
65 |
num_clusters = gr.Radio([12,24,48], value=12, labels="How many clusters do you want to make from the data?")
|
66 |
|
@@ -80,6 +80,10 @@ with gr.Blocks(title=TITLE) as demo:
|
|
80 |
b_desc = gr.Text(label="")
|
81 |
with gr.Column(scale=2):
|
82 |
d = gr.Plot(label="Ethnicity label makeup of cluster")
|
|
|
|
|
|
|
|
|
83 |
demo.load(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a, b, b_desc, c, c_desc, d, gallery])
|
84 |
num_clusters.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a, b, b_desc, c, c_desc, d, gallery])
|
85 |
cluster_id.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a, b, b_desc, c, c_desc, d, gallery])
|
|
|
60 |
|
61 |
with gr.Blocks(title=TITLE) as demo:
|
62 |
gr.Markdown(f"# {TITLE}")
|
63 |
+
gr.Markdown("## This Space lets you explore the clusters based on the data generated from [DiffusionBiasExplorer](https://huggingface.co/spaces/society-ethics/DiffusionBiasExplorer).")
|
64 |
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>""")
|
65 |
num_clusters = gr.Radio([12,24,48], value=12, labels="How many clusters do you want to make from the data?")
|
66 |
|
|
|
80 |
b_desc = gr.Text(label="")
|
81 |
with gr.Column(scale=2):
|
82 |
d = gr.Plot(label="Ethnicity label makeup of cluster")
|
83 |
+
|
84 |
+
gr.Markdown(f"The 'Model makeup' plot corresponds to the number of images from the cluster that come from each of the TTI systems that we are comparing: Dall-E 2, Stable Diffusion v.1.4. and Stable Diffusion v.2.")
|
85 |
+
gr.Markdown(f"The 'Gender label makeup' plot corresponds to the number of images from each of the genders used in the prompts: male, female, non-binary and unmarked ('person')")
|
86 |
+
gr.Markdown(f"The 'Ethnicity label makeup' plot corresponds to the number of images from each of the 18 ethnicities used in the prompts. A blank value means unmarked ethnicity")
|
87 |
demo.load(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a, b, b_desc, c, c_desc, d, gallery])
|
88 |
num_clusters.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a, b, b_desc, c, c_desc, d, gallery])
|
89 |
cluster_id.change(fn=show_cluster, inputs=[cluster_id, num_clusters], outputs=[a, b, b_desc, c, c_desc, d, gallery])
|