sashavor commited on
Commit
da13380
1 Parent(s): 7c66f57

final changes, I'm tired

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -74,21 +74,21 @@ with gr.Blocks() as demo:
74
  gr.HTML('''
75
  <p style="margin-bottom: 14px; font-size: 100%"> One of the goals of our study was allowing users to compare model generations across professions in an open-ended way, uncovering patterns and trends on their own. This is why we created the <a href='https://huggingface.co/spaces/society-ethics/DiffusionBiasExplorer' style='text-decoration: underline;' target='_blank'> Diffusion Bias Explorer </a> and the <a href='https://huggingface.co/spaces/society-ethics/Average_diffusion_faces' style='text-decoration: underline;' target='_blank'> Average Diffusion Faces </a> tools. We show some of their functionalities below: </p> ''')
76
  with gr.Row():
77
- with gr.Column(scale=2):
78
  explorerpath = "images/biasexplorer"
79
  biasexplorer_gallery = gr.Gallery(get_images(explorerpath),
80
- label="Bias explorer images", show_label=False, elem_id="gallery").style(grid=[2])
81
- with gr.Column(scale=1):
82
  gr.HTML('''
83
  <p style="margin-bottom: 14px; font-size: 100%"> Comparing generations both between two models and within a single model can help uncover trends and patterns that are hard to measure using quantitative approaches. <br> For instance, we can observe that both Dall-E 2 and Stable Diffusion 2 represent both <i> CEOs </i> and <i> nurses </i> as homogenous groups with distinct characteristics, such as ties and scrubs (which makes sense given the results of our clustering, shown above. <br> We can also see that the images of <i> waitresses </i> generated by Dall-E 2 and Stable Diffusion v.1.4. have different characteristics, both in terms of their clothes as well as their appearance. <br> It's also possible to see harder to describe phenomena, like the fact that portraits of <i> painters </i> often look like paintings themselves. <br> We encourage you to use the <a href='https://huggingface.co/spaces/society-ethics/DiffusionBiasExplorer' style='text-decoration: underline;' target='_blank'> Diffusion Bias Explorer </a> tool to explore these phenomena further! </p>''')
84
  with gr.Row():
85
- with gr.Column(scale=2):
86
  averagepath = "images/averagefaces"
87
  average_gallery = gr.Gallery(get_images(averagepath),
88
- label="Average Face images", show_label=False, elem_id="gallery").style(grid=[2])
89
- with gr.Column(scale=1):
90
  gr.HTML('''
91
- <p style="margin-bottom: 14px; font-size: 100%"> Looking at the average faces for a given profession across multiple models can help see the dominant characteristics of that profession, as well as how much variation there is (based on how fuzzy the image is). <br> In the images shown here, we can see that representations of these professions significantly differ across the three models, while sharing common characteristics, e.g. <i> postal workers </i> all wear caps. <br> Also, the average faces of <i> hairdressers </i> seem more fuzzy than the other professions, indicating a higher diversity among the generations compared to other professions.</p>''')
92
 
93
  with gr.Accordion("Exploring the color space of generated images", open=False):
94
  gr.HTML('''
 
74
  gr.HTML('''
75
  <p style="margin-bottom: 14px; font-size: 100%"> One of the goals of our study was allowing users to compare model generations across professions in an open-ended way, uncovering patterns and trends on their own. This is why we created the <a href='https://huggingface.co/spaces/society-ethics/DiffusionBiasExplorer' style='text-decoration: underline;' target='_blank'> Diffusion Bias Explorer </a> and the <a href='https://huggingface.co/spaces/society-ethics/Average_diffusion_faces' style='text-decoration: underline;' target='_blank'> Average Diffusion Faces </a> tools. We show some of their functionalities below: </p> ''')
76
  with gr.Row():
77
+ with gr.Column(scale = 2):
78
  explorerpath = "images/biasexplorer"
79
  biasexplorer_gallery = gr.Gallery(get_images(explorerpath),
80
+ label="Bias explorer images", show_label=False, elem_id="gallery").style(grid=[2,2])
81
+ with gr.Column(scale =1):
82
  gr.HTML('''
83
  <p style="margin-bottom: 14px; font-size: 100%"> Comparing generations both between two models and within a single model can help uncover trends and patterns that are hard to measure using quantitative approaches. <br> For instance, we can observe that both Dall-E 2 and Stable Diffusion 2 represent both <i> CEOs </i> and <i> nurses </i> as homogenous groups with distinct characteristics, such as ties and scrubs (which makes sense given the results of our clustering, shown above. <br> We can also see that the images of <i> waitresses </i> generated by Dall-E 2 and Stable Diffusion v.1.4. have different characteristics, both in terms of their clothes as well as their appearance. <br> It's also possible to see harder to describe phenomena, like the fact that portraits of <i> painters </i> often look like paintings themselves. <br> We encourage you to use the <a href='https://huggingface.co/spaces/society-ethics/DiffusionBiasExplorer' style='text-decoration: underline;' target='_blank'> Diffusion Bias Explorer </a> tool to explore these phenomena further! </p>''')
84
  with gr.Row():
85
+ with gr.Column():
86
  averagepath = "images/averagefaces"
87
  average_gallery = gr.Gallery(get_images(averagepath),
88
+ label="Average Face images", show_label=False, elem_id="gallery").style(grid=[1,3], height=560)
89
+ with gr.Column():
90
  gr.HTML('''
91
+ <p style="margin-bottom: 14px; font-size: 100%"> Looking at the average faces for a given profession across multiple models can help see the dominant characteristics of that profession, as well as how much variation there is (based on how fuzzy the image is). <br> In the images shown here, we can see that representations of these professions significantly differ across the three models, while sharing common characteristics, e.g. <i> postal workers </i> all wear caps. <br> Also, the average faces of <i> hairdressers </i> seem more fuzzy than the other professions, indicating a higher diversity among the generations compared to other professions. <br> Look at the <a href='https://huggingface.co/spaces/society-ethics/Average_diffusion_faces' style='text-decoration: underline;' target='_blank'> Average Diffusion Faces </a> tool for more examples! </p>''')
92
 
93
  with gr.Accordion("Exploring the color space of generated images", open=False):
94
  gr.HTML('''