Spaces:
Running
Running
Update app.py
Browse filesChanging layout UI
app.py
CHANGED
|
@@ -10,6 +10,18 @@ import logging
|
|
| 10 |
logging.basicConfig(level=logging.INFO)
|
| 11 |
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
########### Function for getting response #######################
|
| 14 |
def chat_response(query, filter_metadata=None):
|
| 15 |
"""Generate chat response based on method and inputs"""
|
|
@@ -82,27 +94,7 @@ def render_sources(chunks, query):
|
|
| 82 |
st.markdown(remainder, unsafe_allow_html=True)
|
| 83 |
st.divider()
|
| 84 |
|
| 85 |
-
# Banner at top
|
| 86 |
-
st.markdown(
|
| 87 |
-
"""
|
| 88 |
-
<div style="background-color:#0071BC; padding: 15px; text-align:center;">
|
| 89 |
-
<h1 style="color:white; margin:0;">Chatbot Project</h1>
|
| 90 |
-
</div>
|
| 91 |
-
""",
|
| 92 |
-
unsafe_allow_html=True
|
| 93 |
-
)
|
| 94 |
-
|
| 95 |
-
# Static welcome text box above input
|
| 96 |
-
st.text_area(
|
| 97 |
-
label="",
|
| 98 |
-
value="Welcome to the chatbot project of the agency. We are here to help.",
|
| 99 |
-
height=50,
|
| 100 |
-
max_chars=None,
|
| 101 |
-
disabled=True
|
| 102 |
-
)
|
| 103 |
|
| 104 |
-
|
| 105 |
-
st.set_page_config(page_title="Montreal AI Decisions (MVP)")
|
| 106 |
for key in ('meetings_filter', 'country_filter', 'project_filter'):
|
| 107 |
if key not in st.session_state:
|
| 108 |
st.session_state[key] = 'All'
|
|
|
|
| 10 |
logging.basicConfig(level=logging.INFO)
|
| 11 |
|
| 12 |
|
| 13 |
+
st.set_page_config(page_title="Montreal AI Decisions (MVP)")
|
| 14 |
+
|
| 15 |
+
# Banner at the top with United Nations blue background and white heading text
|
| 16 |
+
st.markdown(
|
| 17 |
+
"""
|
| 18 |
+
<div style="background-color:#0071BC; padding: 15px 0; text-align:center; width: 100%;">
|
| 19 |
+
<h1 style="color:white; margin:0;">Chatbot Project</h1>
|
| 20 |
+
</div>
|
| 21 |
+
""",
|
| 22 |
+
unsafe_allow_html=True
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
########### Function for getting response #######################
|
| 26 |
def chat_response(query, filter_metadata=None):
|
| 27 |
"""Generate chat response based on method and inputs"""
|
|
|
|
| 94 |
st.markdown(remainder, unsafe_allow_html=True)
|
| 95 |
st.divider()
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
|
|
|
|
|
|
| 98 |
for key in ('meetings_filter', 'country_filter', 'project_filter'):
|
| 99 |
if key not in st.session_state:
|
| 100 |
st.session_state[key] = 'All'
|