Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,13 +21,13 @@ if 'init_time' not in st.session_state:
|
|
21 |
st.session_state.init_time = None
|
22 |
if 'form_key' not in st.session_state:
|
23 |
st.session_state.form_key = 0 # This will help us reset the form
|
24 |
-
#
|
25 |
if 'is_processing' not in st.session_state:
|
26 |
st.session_state.is_processing = False
|
27 |
# Store the answer so that it persists on screen
|
28 |
if 'last_answer' not in st.session_state:
|
29 |
st.session_state.last_answer = None
|
30 |
-
# Add
|
31 |
if 'show_acknowledgment' not in st.session_state:
|
32 |
st.session_state.show_acknowledgment = False
|
33 |
# Add page change detection
|
@@ -132,37 +132,6 @@ div.stInfo {
|
|
132 |
border: 1px solid #e1e4f2 !important;
|
133 |
border-radius: 8px !important;
|
134 |
}
|
135 |
-
/* COMBINED SCROLL CONTAINER */
|
136 |
-
.questions-scroll-container {
|
137 |
-
width: 100%;
|
138 |
-
overflow-x: auto;
|
139 |
-
scrollbar-width: none; /* Firefox */
|
140 |
-
-ms-overflow-style: none; /* IE and Edge */
|
141 |
-
}
|
142 |
-
/* Hide scrollbar for Chrome, Safari and Opera */
|
143 |
-
.questions-scroll-container::-webkit-scrollbar {
|
144 |
-
display: none;
|
145 |
-
}
|
146 |
-
/* Inner content that holds both rows */
|
147 |
-
.questions-content {
|
148 |
-
display: inline-flex;
|
149 |
-
flex-direction: column;
|
150 |
-
min-width: max-content;
|
151 |
-
gap: 10px;
|
152 |
-
padding: 5px 0;
|
153 |
-
}
|
154 |
-
/* Individual rows */
|
155 |
-
.questions-row {
|
156 |
-
display: flex;
|
157 |
-
flex-direction: row;
|
158 |
-
gap: 10px;
|
159 |
-
}
|
160 |
-
/* Placeholder for buttons */
|
161 |
-
.button-placeholder {
|
162 |
-
min-height: 38px;
|
163 |
-
min-width: 120px;
|
164 |
-
margin: 0 5px;
|
165 |
-
}
|
166 |
/* Acknowledgment section styling - fully fixed */
|
167 |
.acknowledgment-container {
|
168 |
background-color: #f8f5ff;
|
@@ -213,16 +182,6 @@ div.stInfo {
|
|
213 |
margin: 0 auto;
|
214 |
width: 100%;
|
215 |
}
|
216 |
-
/* Source link styling */
|
217 |
-
.source-link {
|
218 |
-
color: #3f51b5;
|
219 |
-
font-weight: bold;
|
220 |
-
text-decoration: underline;
|
221 |
-
cursor: pointer;
|
222 |
-
}
|
223 |
-
.source-link:hover {
|
224 |
-
color: #6a1b9a;
|
225 |
-
}
|
226 |
</style>
|
227 |
<div class="main-title">Anveshak</div>
|
228 |
<div class="subtitle">Spirituality Q&A</div>
|
|
|
21 |
st.session_state.init_time = None
|
22 |
if 'form_key' not in st.session_state:
|
23 |
st.session_state.form_key = 0 # This will help us reset the form
|
24 |
+
# Variable for debouncing: whether processing is in progress
|
25 |
if 'is_processing' not in st.session_state:
|
26 |
st.session_state.is_processing = False
|
27 |
# Store the answer so that it persists on screen
|
28 |
if 'last_answer' not in st.session_state:
|
29 |
st.session_state.last_answer = None
|
30 |
+
# Add session state for showing/hiding acknowledgment
|
31 |
if 'show_acknowledgment' not in st.session_state:
|
32 |
st.session_state.show_acknowledgment = False
|
33 |
# Add page change detection
|
|
|
132 |
border: 1px solid #e1e4f2 !important;
|
133 |
border-radius: 8px !important;
|
134 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
/* Acknowledgment section styling - fully fixed */
|
136 |
.acknowledgment-container {
|
137 |
background-color: #f8f5ff;
|
|
|
182 |
margin: 0 auto;
|
183 |
width: 100%;
|
184 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
</style>
|
186 |
<div class="main-title">Anveshak</div>
|
187 |
<div class="subtitle">Spirituality Q&A</div>
|