Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,10 @@ if 'show_acknowledgment' not in st.session_state:
|
|
33 |
from rag_engine import process_query, load_model, cached_load_data_files
|
34 |
from utils import setup_all_auth
|
35 |
|
|
|
|
|
|
|
|
|
36 |
# Custom styling (pure CSS)
|
37 |
st.markdown("""
|
38 |
<style>
|
@@ -137,6 +141,14 @@ div.stInfo {
|
|
137 |
margin-top: 10px;
|
138 |
font-style: italic;
|
139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
</style>
|
141 |
<div class="main-title">Spirituality Q&A</div>
|
142 |
""", unsafe_allow_html=True)
|
@@ -164,9 +176,7 @@ elif st.session_state.init_time is not None:
|
|
164 |
st.session_state.init_time = None
|
165 |
|
166 |
# Heartfelt acknowledgment section with toggle
|
167 |
-
|
168 |
-
if acknowledgment_button:
|
169 |
-
st.session_state.show_acknowledgment = not st.session_state.show_acknowledgment
|
170 |
|
171 |
if st.session_state.show_acknowledgment:
|
172 |
st.markdown('<div class="acknowledgment-container">', unsafe_allow_html=True)
|
@@ -308,4 +318,13 @@ It searches through a database of texts to find relevant passages and generates
|
|
308 |
|
309 |
For detailed information about the sources used in this application, including saints, sacred texts, and publishers,
|
310 |
please visit the "Sources" page in the navigation menu.
|
311 |
-
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
from rag_engine import process_query, load_model, cached_load_data_files
|
34 |
from utils import setup_all_auth
|
35 |
|
36 |
+
# Function to toggle acknowledgment visibility
|
37 |
+
def toggle_acknowledgment():
|
38 |
+
st.session_state.show_acknowledgment = not st.session_state.show_acknowledgment
|
39 |
+
|
40 |
# Custom styling (pure CSS)
|
41 |
st.markdown("""
|
42 |
<style>
|
|
|
141 |
margin-top: 10px;
|
142 |
font-style: italic;
|
143 |
}
|
144 |
+
.citation-note {
|
145 |
+
font-size: 0.8rem;
|
146 |
+
font-style: italic;
|
147 |
+
color: #666;
|
148 |
+
padding: 10px;
|
149 |
+
border-top: 1px solid #eee;
|
150 |
+
margin-top: 30px;
|
151 |
+
}
|
152 |
</style>
|
153 |
<div class="main-title">Spirituality Q&A</div>
|
154 |
""", unsafe_allow_html=True)
|
|
|
176 |
st.session_state.init_time = None
|
177 |
|
178 |
# Heartfelt acknowledgment section with toggle
|
179 |
+
st.button("Gratitude and Acknowledgments", on_click=toggle_acknowledgment)
|
|
|
|
|
180 |
|
181 |
if st.session_state.show_acknowledgment:
|
182 |
st.markdown('<div class="acknowledgment-container">', unsafe_allow_html=True)
|
|
|
318 |
|
319 |
For detailed information about the sources used in this application, including saints, sacred texts, and publishers,
|
320 |
please visit the "Sources" page in the navigation menu.
|
321 |
+
""")
|
322 |
+
|
323 |
+
# Citation note at the bottom
|
324 |
+
st.markdown('<div class="citation-note">', unsafe_allow_html=True)
|
325 |
+
st.markdown("""
|
326 |
+
The answers presented in this application are re-presented summaries of relevant passages from the listed citations.
|
327 |
+
For the original works in their complete and authentic form, users are respectfully encouraged to purchase
|
328 |
+
the original print or digital works from their respective publishers.
|
329 |
+
""")
|
330 |
+
st.markdown('</div>', unsafe_allow_html=True)
|