Spaces:
Runtime error
Runtime error
gchhablani
commited on
Commit
·
8aeec32
1
Parent(s):
c684eba
Remove captions in example
Browse files- apps/examples.py +10 -10
- apps/utils.py +1 -1
apps/examples.py
CHANGED
@@ -9,11 +9,11 @@ def color_bias_examples():
|
|
9 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
10 |
|
11 |
col1.write("Wrestlers")
|
12 |
-
col2.image("./sections/bias_examples/rock_cena.jpeg", use_column_width='always', caption="https://cdn0.vox-cdn.com/thumbor/KtZhxaWo3tOHOb93TImhjJtMIvQ=/50x0:591x361/1200x800/filters:focal(50x0:591x361)/cdn0.vox-cdn.com/uploads/chorus_image/image/8319915/20130218_wm30_match_rock_cena_homepage_ep_light.0.jpg")
|
13 |
|
14 |
-
col3.image("./sections/bias_examples/rock_cena_flipped.jpeg", use_column_width='always'
|
15 |
|
16 |
-
col4.image("./sections/bias_examples/black_white_wrestler.jpeg", use_column_width='always', caption="https://i1.ytimg.com/vi/uBoKILQyT70/maxresdefault.jpg")
|
17 |
|
18 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
19 |
|
@@ -45,11 +45,11 @@ def gender_bias_examples():
|
|
45 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
46 |
|
47 |
col1.write("Male/Female Cricketers")
|
48 |
-
col2.image("./sections/bias_examples/female_cricketer.jpeg", use_column_width='always', caption="https://www.crictracker.com/wp-content/uploads/2018/06/Sarah-Taylor-1.jpg")
|
49 |
|
50 |
-
col3.image("./sections/bias_examples/male_cricketer.jpeg", use_column_width='always'
|
51 |
|
52 |
-
col4.image("./sections/bias_examples/male_cricketer_indian.jpeg", use_column_width='always', caption="https://tse4.mm.bing.net/th?id=OIP.FOdOQvpiFA_HE32pA0zB-QHaEd&pid=Api")
|
53 |
|
54 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
55 |
|
@@ -191,11 +191,11 @@ def gender_bias_examples():
|
|
191 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
192 |
|
193 |
col1.write("Male/Female Programmer")
|
194 |
-
col2.image("./sections/bias_examples/female_programmer.jpeg", use_column_width='always', caption="https://tse4.mm.bing.net/th?id=OIP.GZ3Ol84W4UcOpVR9oawWygHaE7&pid=Api"
|
195 |
|
196 |
-
col3.image("./sections/bias_examples/male_programmer.jpeg", use_column_width='always'
|
197 |
|
198 |
-
col4.image("./sections/bias_examples/female_programmer_short_haired.jpeg", use_column_width='always', caption="https://media.istockphoto.com/photos/profile-view-of-young-female-programmer-working-on-computer-software-picture-id1125595211")
|
199 |
|
200 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
201 |
|
@@ -336,7 +336,7 @@ def gender_bias_examples():
|
|
336 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
337 |
|
338 |
col1.write("Driving Car")
|
339 |
-
col2.image("./sections/bias_examples/car_driving.jpeg", use_column_width='always'
|
340 |
|
341 |
|
342 |
col3.write("**Is the driver male or female?**")
|
|
|
9 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
10 |
|
11 |
col1.write("Wrestlers")
|
12 |
+
col2.image("./sections/bias_examples/rock_cena.jpeg", use_column_width='always')# , caption="https://cdn0.vox-cdn.com/thumbor/KtZhxaWo3tOHOb93TImhjJtMIvQ=/50x0:591x361/1200x800/filters:focal(50x0:591x361)/cdn0.vox-cdn.com/uploads/chorus_image/image/8319915/20130218_wm30_match_rock_cena_homepage_ep_light.0.jpg")
|
13 |
|
14 |
+
col3.image("./sections/bias_examples/rock_cena_flipped.jpeg", use_column_width='always')# caption="https://cdn.vox-cdn.com/thumbor/sZAswH6v3LUEdt1HhL6bed_KBqc=/0x0:642x361/1600x900/cdn.vox-cdn.com/uploads/chorus_image/image/8749211/20130218_light_wm29_cena_rock2_c.0.jpg")
|
15 |
|
16 |
+
col4.image("./sections/bias_examples/black_white_wrestler.jpeg", use_column_width='always')# , caption="https://i1.ytimg.com/vi/uBoKILQyT70/maxresdefault.jpg")
|
17 |
|
18 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
19 |
|
|
|
45 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
46 |
|
47 |
col1.write("Male/Female Cricketers")
|
48 |
+
col2.image("./sections/bias_examples/female_cricketer.jpeg", use_column_width='always')# , caption="https://www.crictracker.com/wp-content/uploads/2018/06/Sarah-Taylor-1.jpg")
|
49 |
|
50 |
+
col3.image("./sections/bias_examples/male_cricketer.jpeg", use_column_width='always')#, caption="https://www.cricket.com.au/~/-/media/News/2019/02/11pucovskiw.ashx?w=1600")
|
51 |
|
52 |
+
col4.image("./sections/bias_examples/male_cricketer_indian.jpeg", use_column_width='always')# , caption="https://tse4.mm.bing.net/th?id=OIP.FOdOQvpiFA_HE32pA0zB-QHaEd&pid=Api")
|
53 |
|
54 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
55 |
|
|
|
191 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
192 |
|
193 |
col1.write("Male/Female Programmer")
|
194 |
+
col2.image("./sections/bias_examples/female_programmer.jpeg", use_column_width='always')# , caption="https://tse4.mm.bing.net/th?id=OIP.GZ3Ol84W4UcOpVR9oawWygHaE7&pid=Api"
|
195 |
|
196 |
+
col3.image("./sections/bias_examples/male_programmer.jpeg", use_column_width='always') # caption="https://thumbs.dreamstime.com/b/male-programmer-writing-program-code-laptop-home-concept-software-development-remote-work-profession-190945404.jpg")
|
197 |
|
198 |
+
col4.image("./sections/bias_examples/female_programmer_short_haired.jpeg", use_column_width='always') # , caption="https://media.istockphoto.com/photos/profile-view-of-young-female-programmer-working-on-computer-software-picture-id1125595211")
|
199 |
|
200 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
201 |
|
|
|
336 |
col1, col2, col3, col4 = st.beta_columns([1,1,1,1])
|
337 |
|
338 |
col1.write("Driving Car")
|
339 |
+
col2.image("./sections/bias_examples/car_driving.jpeg", use_column_width='always') # caption="https://jooinn.com/images/car-driving-fast-2.jpg")
|
340 |
|
341 |
|
342 |
col3.write("**Is the driver male or female?**")
|
apps/utils.py
CHANGED
@@ -35,7 +35,7 @@ class Toc:
|
|
35 |
self._placeholder.markdown("\n".join(self._items), unsafe_allow_html=True)
|
36 |
|
37 |
def _markdown(self, text, level, space=""):
|
38 |
-
key = "".join(filter(str.isalnum, text)).lower()
|
39 |
|
40 |
st.markdown(f"<{level} id='{key}'>{text}</{level}>", unsafe_allow_html=True)
|
41 |
self._items.append(f"{space}* <a href='#{key}'>{text}</a>")
|
|
|
35 |
self._placeholder.markdown("\n".join(self._items), unsafe_allow_html=True)
|
36 |
|
37 |
def _markdown(self, text, level, space=""):
|
38 |
+
key = "".join(filter(str.isalnum, text)).lower()
|
39 |
|
40 |
st.markdown(f"<{level} id='{key}'>{text}</{level}>", unsafe_allow_html=True)
|
41 |
self._items.append(f"{space}* <a href='#{key}'>{text}</a>")
|