prakharg24 commited on
Commit
7be2c91
·
verified ·
1 Parent(s): 84bf197

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -12
app.py CHANGED
@@ -10,10 +10,17 @@ st.markdown(
10
  align-items: center;
11
  text-align: center;
12
  }
13
- .clickable-sentence {
 
14
  color: #3366cc;
15
- cursor: pointer;
 
 
16
  text-decoration: underline;
 
 
 
 
17
  }
18
  </style>
19
  """,
@@ -62,16 +69,18 @@ if st.session_state.page == "landing":
62
  # -----------------------------
63
  elif st.session_state.page == "main":
64
  st.markdown("<div class='center-container'>", unsafe_allow_html=True)
65
-
66
- paragraph_html = """
67
- <p style='font-size:20px; line-height:1.6; max-width:800px;'>
68
- <a class='clickable-sentence' href='?page=sentence_0'>Multiplicity: Many models, same accuracy, different predictions.</a>
69
- <a class='clickable-sentence' href='?page=sentence_1'>ICA Framework: Intentional, Conventional, and Arbitrary decisions.</a>
70
- <a class='clickable-sentence' href='?page=sentence_2'>Arbitrariness: Why different models might treat individuals differently.</a>
71
- <a class='clickable-sentence' href='?page=sentence_3'>Homogenization: Why similar decisions happen across many developers.</a>
72
- </p>
73
- """
74
- st.markdown(paragraph_html, unsafe_allow_html=True)
 
 
75
 
76
  st.markdown("</div>", unsafe_allow_html=True)
77
 
 
10
  align-items: center;
11
  text-align: center;
12
  }
13
+ div[data-testid="stButton"] > button {
14
+ background: none;
15
  color: #3366cc;
16
+ border: none;
17
+ padding: 0;
18
+ font-size: 20px;
19
  text-decoration: underline;
20
+ cursor: pointer;
21
+ }
22
+ div[data-testid="stButton"] {
23
+ display: inline;
24
  }
25
  </style>
26
  """,
 
69
  # -----------------------------
70
  elif st.session_state.page == "main":
71
  st.markdown("<div class='center-container'>", unsafe_allow_html=True)
72
+ st.write("") # spacing
73
+
74
+ st.write("Click any sentence to explore:")
75
+
76
+ # Build paragraph-like flow
77
+ st.button("Multiplicity: Many models, same accuracy, different predictions.", key="s0", on_click=go_to, args=("sentence_0",))
78
+ st.write(" ", unsafe_allow_html=True)
79
+ st.button("ICA Framework: Intentional, Conventional, and Arbitrary decisions.", key="s1", on_click=go_to, args=("sentence_1",))
80
+ st.write(" ", unsafe_allow_html=True)
81
+ st.button("Arbitrariness: Why different models might treat individuals differently.", key="s2", on_click=go_to, args=("sentence_2",))
82
+ st.write(" ", unsafe_allow_html=True)
83
+ st.button("Homogenization: Why similar decisions happen across many developers.", key="s3", on_click=go_to, args=("sentence_3",))
84
 
85
  st.markdown("</div>", unsafe_allow_html=True)
86