Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,28 +11,28 @@ from utils import setup_all_auth
|
|
11 |
# Display title with custom styling
|
12 |
st.markdown("""
|
13 |
<style>
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
</style>
|
37 |
<div class="main-title">Indian Spiritual Texts Q&A</div>
|
38 |
""", unsafe_allow_html=True)
|
@@ -103,10 +103,8 @@ if st.button("Get Answer") or st.session_state.submit_clicked:
|
|
103 |
with st.spinner("Processing your question..."):
|
104 |
try:
|
105 |
result = process_query(st.session_state.last_query, top_k=top_k, word_limit=word_limit)
|
106 |
-
|
107 |
st.subheader("Answer:")
|
108 |
st.write(result["answer_with_rag"])
|
109 |
-
|
110 |
st.subheader("Sources:")
|
111 |
for citation in result["citations"].split("\n"):
|
112 |
st.write(citation)
|
@@ -120,6 +118,5 @@ st.markdown("---")
|
|
120 |
st.markdown("""
|
121 |
### About this app
|
122 |
This application uses a Retrieval-Augmented Generation (RAG) system to answer questions about Indian spiritual texts.
|
123 |
-
|
124 |
It searches through a database of texts to find relevant passages and generates answers based on those passages.
|
125 |
""")
|
|
|
11 |
# Display title with custom styling
|
12 |
st.markdown("""
|
13 |
<style>
|
14 |
+
.main-title {
|
15 |
+
font-size: 2.5rem;
|
16 |
+
color: #FF5722;
|
17 |
+
text-align: center;
|
18 |
+
margin-bottom: 1rem;
|
19 |
+
}
|
20 |
+
.button-style {
|
21 |
+
border: 2px solid #FF5722;
|
22 |
+
border-radius: 8px;
|
23 |
+
}
|
24 |
+
.input-style {
|
25 |
+
border: 2px solid #4CAF50;
|
26 |
+
border-radius: 8px;
|
27 |
+
}
|
28 |
+
.stButton>button {
|
29 |
+
border: 2px solid #FF5722 !important;
|
30 |
+
border-radius: 8px !important;
|
31 |
+
}
|
32 |
+
.stTextInput>div>div>input {
|
33 |
+
border: 2px solid #4CAF50 !important;
|
34 |
+
border-radius: 8px !important;
|
35 |
+
}
|
36 |
</style>
|
37 |
<div class="main-title">Indian Spiritual Texts Q&A</div>
|
38 |
""", unsafe_allow_html=True)
|
|
|
103 |
with st.spinner("Processing your question..."):
|
104 |
try:
|
105 |
result = process_query(st.session_state.last_query, top_k=top_k, word_limit=word_limit)
|
|
|
106 |
st.subheader("Answer:")
|
107 |
st.write(result["answer_with_rag"])
|
|
|
108 |
st.subheader("Sources:")
|
109 |
for citation in result["citations"].split("\n"):
|
110 |
st.write(citation)
|
|
|
118 |
st.markdown("""
|
119 |
### About this app
|
120 |
This application uses a Retrieval-Augmented Generation (RAG) system to answer questions about Indian spiritual texts.
|
|
|
121 |
It searches through a database of texts to find relevant passages and generates answers based on those passages.
|
122 |
""")
|