zseid
commited on
Commit
•
1fba3a8
1
Parent(s):
932522d
add graph captions, remove g
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ def occ_graph(model):
|
|
84 |
tda_res,occ_result = results[model]
|
85 |
pass_gen,pass_skin = evaluate_by_occupation(occupation_df=occ_result,model=model)
|
86 |
fig = generate_histplot(occ_result, 'a_median', 'gender_detected_val',
|
87 |
-
title='Gender Distribution by Median
|
88 |
xlabel= 'Median Annual Salary',
|
89 |
ylabel= 'Count',)
|
90 |
fig2 = lumia_violinplot(df=occ_result, x_col='a_median',
|
@@ -169,21 +169,24 @@ if __name__=='__main__':
|
|
169 |
ss_pass = gr.HighlightedText(label="Skin Color Bias by Sentiment").style(color_map={"PASS":"green","FAIL":"red"})
|
170 |
with gr.Accordion("See Graph",open=False):
|
171 |
sent_skin = gr.Image()
|
172 |
-
|
|
|
173 |
sg_pass = gr.HighlightedText(label="Gender Bias by Sentiment").style(
|
174 |
color_map={"PASS": "green", "FAIL": "red"})
|
175 |
with gr.Accordion("See Graph",open=False):
|
176 |
sent_gen = gr.Image()
|
177 |
-
|
178 |
os_pass = gr.HighlightedText(label="Skin Color Bias by Occupation/Income").style(
|
179 |
color_map={"PASS": "green", "FAIL": "red"})
|
180 |
with gr.Accordion("See Graph",open=False):
|
181 |
occ_skin = gr.Image()
|
182 |
-
|
|
|
183 |
og_pass = gr.HighlightedText(label="Gender Bias by Occupation/Income").style(
|
184 |
color_map={"PASS": "green", "FAIL": "red"})
|
185 |
with gr.Accordion("See Graph",open=False):
|
186 |
occ_gen = gr.Image()
|
|
|
187 |
btn.click(fn=cached_results,inputs=model,outputs=[sample,ss_pass,sg_pass,sent_skin,sent_gen,os_pass,og_pass,occ_skin,occ_gen])
|
188 |
with gr.Tab("Image Analysis"):
|
189 |
gr.Markdown("# Generate an example image and view the automated analysis")
|
|
|
84 |
tda_res,occ_result = results[model]
|
85 |
pass_gen,pass_skin = evaluate_by_occupation(occupation_df=occ_result,model=model)
|
86 |
fig = generate_histplot(occ_result, 'a_median', 'gender_detected_val',
|
87 |
+
title='Gender Distribution by Median Annual Salary',
|
88 |
xlabel= 'Median Annual Salary',
|
89 |
ylabel= 'Count',)
|
90 |
fig2 = lumia_violinplot(df=occ_result, x_col='a_median',
|
|
|
169 |
ss_pass = gr.HighlightedText(label="Skin Color Bias by Sentiment").style(color_map={"PASS":"green","FAIL":"red"})
|
170 |
with gr.Accordion("See Graph",open=False):
|
171 |
sent_skin = gr.Image()
|
172 |
+
gr.Markdown("A violin plot depicting the distribution of skin color intensity values, binned by trait sentiment."
|
173 |
+
" Individual violin bins are colored by the median RGB intensity value of their bin, while the black notches signify the mean RGB intensity value.")
|
174 |
sg_pass = gr.HighlightedText(label="Gender Bias by Sentiment").style(
|
175 |
color_map={"PASS": "green", "FAIL": "red"})
|
176 |
with gr.Accordion("See Graph",open=False):
|
177 |
sent_gen = gr.Image()
|
178 |
+
gr.Markdown("A histogram depicting gender distribution by trait sentiment")
|
179 |
os_pass = gr.HighlightedText(label="Skin Color Bias by Occupation/Income").style(
|
180 |
color_map={"PASS": "green", "FAIL": "red"})
|
181 |
with gr.Accordion("See Graph",open=False):
|
182 |
occ_skin = gr.Image()
|
183 |
+
gr.Markdown("A violin plot depicting the distribution of skin color intensity values, binned by median salary."
|
184 |
+
" Individual violin bins are colored by the median RGB intensity value of their bin, while the black notches signify the mean RGB intensity value.")
|
185 |
og_pass = gr.HighlightedText(label="Gender Bias by Occupation/Income").style(
|
186 |
color_map={"PASS": "green", "FAIL": "red"})
|
187 |
with gr.Accordion("See Graph",open=False):
|
188 |
occ_gen = gr.Image()
|
189 |
+
gr.Markdown("A histogram depicting gender distribution by median annual salary of occupational title")
|
190 |
btn.click(fn=cached_results,inputs=model,outputs=[sample,ss_pass,sg_pass,sent_skin,sent_gen,os_pass,og_pass,occ_skin,occ_gen])
|
191 |
with gr.Tab("Image Analysis"):
|
192 |
gr.Markdown("# Generate an example image and view the automated analysis")
|