Update src/streamlit_app.py
Browse files- src/streamlit_app.py +23 -74
src/streamlit_app.py
CHANGED
|
@@ -87,58 +87,35 @@ Output: Write each question on a new line. Do not invent facts β base question
|
|
| 87 |
except Exception:
|
| 88 |
return ["How do I start using this guide?", "What does this document cover?"]
|
| 89 |
|
| 90 |
-
#
|
|
|
|
|
|
|
| 91 |
st.markdown("""
|
| 92 |
<style>
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
padding-top: 1.2rem;
|
| 96 |
-
max-width: 1080px;
|
| 97 |
-
background-color: transparent; /* let HF/Streamlit top-level handle page padding */
|
| 98 |
-
}
|
| 99 |
-
|
| 100 |
-
/* Headings and core text (soft white) */
|
| 101 |
-
h1, h2, h3 {
|
| 102 |
-
color: #f3f4f6 !important;
|
| 103 |
-
font-weight: 600;
|
| 104 |
-
letter-spacing: -0.2px;
|
| 105 |
-
}
|
| 106 |
-
p, label, .stMarkdown, .stRadio label {
|
| 107 |
-
color: #e5e7eb !important;
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
/* Suggestion chips (dark default look but not heavy) */
|
| 111 |
.suggest-chip {
|
| 112 |
-
background: #
|
| 113 |
border: 1px solid #374151;
|
| 114 |
border-radius: 14px;
|
| 115 |
-
color: #
|
| 116 |
padding: 8px 12px;
|
| 117 |
cursor: pointer;
|
| 118 |
font-size: 13px;
|
| 119 |
margin: 6px 6px 6px 0;
|
| 120 |
display: inline-block;
|
| 121 |
-
transition: background 0.2s, transform 0.1s
|
| 122 |
-
}
|
| 123 |
-
.suggest-chip:hover {
|
| 124 |
-
background: #2563eb;
|
| 125 |
-
color: #fff;
|
| 126 |
-
box-shadow: 0 2px 6px rgba(37,99,235,0.16);
|
| 127 |
-
transform: translateY(-2px);
|
| 128 |
}
|
| 129 |
-
|
| 130 |
-
/* Answer box β dark card styling that isn't too heavy */
|
| 131 |
.answer-box {
|
| 132 |
-
background: linear-gradient(180deg
|
| 133 |
border-left: 4px solid #3b82f6;
|
| 134 |
-
border-radius:
|
| 135 |
padding: 16px 18px;
|
| 136 |
-
color: #
|
| 137 |
margin-top: 12px;
|
| 138 |
-
box-shadow: 0
|
| 139 |
}
|
| 140 |
-
|
| 141 |
-
/* Input box refinement */
|
| 142 |
.stTextInput > div > div > input {
|
| 143 |
background-color: #0f172a !important;
|
| 144 |
color: #f1f5f9 !important;
|
|
@@ -147,46 +124,18 @@ p, label, .stMarkdown, .stRadio label {
|
|
| 147 |
padding: 8px 10px !important;
|
| 148 |
font-size: 15px !important;
|
| 149 |
}
|
| 150 |
-
.stTextInput > label {font-weight: 500;
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
}
|
| 156 |
|
| 157 |
-
/*
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
}
|
| 163 |
-
|
| 164 |
-
/* Answer box becomes a light card */
|
| 165 |
-
.answer-box {
|
| 166 |
-
background: #ffffff !important;
|
| 167 |
-
color: #0f172a !important;
|
| 168 |
-
border-left: 4px solid #2563eb !important;
|
| 169 |
-
box-shadow: 0 6px 20px rgba(17,24,39,0.06) !important;
|
| 170 |
-
}
|
| 171 |
-
|
| 172 |
-
/* Suggest chips become pale buttons */
|
| 173 |
-
.suggest-chip {
|
| 174 |
-
background: #f1f5f9 !important;
|
| 175 |
-
border: 1px solid #e6eef8 !important;
|
| 176 |
-
color: #0f172a !important;
|
| 177 |
-
}
|
| 178 |
-
.suggest-chip:hover {
|
| 179 |
-
background: #2563eb !important;
|
| 180 |
-
color: #fff !important;
|
| 181 |
-
box-shadow: 0 2px 6px rgba(37,99,235,0.15) !important;
|
| 182 |
-
}
|
| 183 |
-
|
| 184 |
-
/* Input field for light mode */
|
| 185 |
-
.stTextInput > div > div > input {
|
| 186 |
-
background-color: #ffffff !important;
|
| 187 |
-
color: #0f172a !important;
|
| 188 |
-
border: 1px solid #e6eef8 !important;
|
| 189 |
-
}
|
| 190 |
}
|
| 191 |
</style>
|
| 192 |
""", unsafe_allow_html=True)
|
|
|
|
| 87 |
except Exception:
|
| 88 |
return ["How do I start using this guide?", "What does this document cover?"]
|
| 89 |
|
| 90 |
+
# ==========================================================
|
| 91 |
+
# π¨ STYLING β REVERT TO ORIGINAL
|
| 92 |
+
# ==========================================================
|
| 93 |
st.markdown("""
|
| 94 |
<style>
|
| 95 |
+
div.block-container {padding-top: 1.2rem; max-width: 1080px;}
|
| 96 |
+
h1, h2, h3 {color: #f3f4f6; font-weight: 600;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
.suggest-chip {
|
| 98 |
+
background: #0f1724;
|
| 99 |
border: 1px solid #374151;
|
| 100 |
border-radius: 14px;
|
| 101 |
+
color: #e6eef8;
|
| 102 |
padding: 8px 12px;
|
| 103 |
cursor: pointer;
|
| 104 |
font-size: 13px;
|
| 105 |
margin: 6px 6px 6px 0;
|
| 106 |
display: inline-block;
|
| 107 |
+
transition: background 0.2s, transform 0.1s;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
+
.suggest-chip:hover {background: #1e3a8a; transform: translateY(-2px);}
|
|
|
|
| 110 |
.answer-box {
|
| 111 |
+
background: linear-gradient(180deg,#0b1220,#071027);
|
| 112 |
border-left: 4px solid #3b82f6;
|
| 113 |
+
border-radius: 8px;
|
| 114 |
padding: 16px 18px;
|
| 115 |
+
color: #e6eef8;
|
| 116 |
margin-top: 12px;
|
| 117 |
+
box-shadow: 0 4px 14px rgba(0,0,0,0.35);
|
| 118 |
}
|
|
|
|
|
|
|
| 119 |
.stTextInput > div > div > input {
|
| 120 |
background-color: #0f172a !important;
|
| 121 |
color: #f1f5f9 !important;
|
|
|
|
| 124 |
padding: 8px 10px !important;
|
| 125 |
font-size: 15px !important;
|
| 126 |
}
|
| 127 |
+
.stTextInput > label {font-weight: 500;}
|
| 128 |
+
.small-link {
|
| 129 |
+
font-size: 13px;
|
| 130 |
+
color: #60a5fa;
|
| 131 |
+
cursor: pointer;
|
| 132 |
}
|
| 133 |
|
| 134 |
+
/* β¨ Highlight the main app title with a subtle gradient */
|
| 135 |
+
h1 {
|
| 136 |
+
background: linear-gradient(90deg,#e2e8f0,#60a5fa);
|
| 137 |
+
-webkit-background-clip: text;
|
| 138 |
+
-webkit-text-fill-color: transparent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
}
|
| 140 |
</style>
|
| 141 |
""", unsafe_allow_html=True)
|