prakharg24 commited on
Commit
a42810f
·
verified ·
1 Parent(s): 91a3676

Delete my_pages/home.py

Browse files
Files changed (1) hide show
  1. my_pages/home.py +0 -86
my_pages/home.py DELETED
@@ -1,86 +0,0 @@
1
- import streamlit as st
2
- from streamlit_extras.stylable_container import stylable_container
3
- from utils import go_to
4
-
5
- def render():
6
- st.markdown(
7
- """
8
- <style>
9
- button[kind="primary"] {
10
- background: none!important;
11
- border: none;
12
- padding: 0!important;
13
- margin: 0!important;
14
- text-decoration: none;
15
- text-align: justify!important;
16
- cursor: pointer;
17
- border: none !important;
18
- display: inline!important;
19
- }
20
- button[kind="primary"]:hover {
21
- text-decoration: underline;
22
- color: #3366cc !important;
23
- }
24
- button[kind="primary"]:focus {
25
- outline: none !important;
26
- box-shadow: none !important;
27
- color: #3366cc !important;
28
- }
29
- button[kind="primary"] span {
30
- font-size: 28px !important;
31
- font-weight: bold !important;
32
- text-align: justify!important;
33
- }
34
- </style>
35
- """,
36
- unsafe_allow_html=True,
37
- )
38
-
39
- sentences = [
40
- (["Translating the real world into concrete data", "can result in information loss."], "information_loss"),
41
- (["This leaves room for multiple interpretations", "of the data (Rashomon effect), thus leading", "to conflicting predictions (Multiplicity)."], "rashomon_effect"),
42
- (["Model development involves countless decisions,", "many of which directly impact the eventual", "interpretation being chosen."], "developer_decisions"),
43
- (["Under intention-convention-arbitrariness (ICA) framework,"], "ica"),
44
- (["intentional decisions help improve model properties,", "conventional decisions lead to homogenization,",
45
- "and arbitrary decisions create conflicting predictions."], "multiverse"),
46
- ]
47
- color_dict = {"information_loss": "#FF6B6B", "rashomon_effect": "#FFD93D", "developer_decisions": "#6BCB77", "ica": "#FF9F1C", "multiverse": "#9D4EDD"}
48
-
49
- button_clicked_dict = {k[1]: False for k in sentences}
50
- for text, page in sentences:
51
- with stylable_container(
52
- page,
53
- css_styles=f"""
54
- button {{
55
- color: {color_dict[page]};
56
- }}""",
57
- ):
58
- # for pieces in text:
59
- # string_to_add =
60
-
61
- # Join with LaTeX line breaks
62
- latex_content = r"$" + r"\\".join([rf"\text{{{line}}}" for line in text]) + r"$"
63
- # button_clicked_dict[page] = st.button(rf"$\small\text{{{text[0]}}}$", type="primary")
64
- button_clicked_dict[page] = st.button(latex_content, type="primary")
65
- if page not in ["ica"]:
66
- st.markdown(" ")
67
-
68
- for page in button_clicked_dict:
69
- if button_clicked_dict[page]:
70
- go_to(page)
71
-
72
- st.markdown(
73
- """
74
- ---
75
- <div style='text-align: center; font-size:18px; color:gray;'>
76
- Click on sentences above to initiate various piece of the demo. <br>
77
- Or click on the 'Start Tutorial' button below to go through them all sequentially. <br><br>
78
- </div>
79
- """,
80
- unsafe_allow_html=True
81
- )
82
-
83
- col1, col2, col3 = st.columns([2, 1, 2])
84
- with col2:
85
- if st.button("Start Tutorial"):
86
- go_to(sentences[0][1])