Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,46 +63,29 @@ st.sidebar.title("Navigation")
|
|
| 63 |
st.sidebar.write("Reclaim Your Mental Health")
|
| 64 |
st.sidebar.markdown("[Visit us at](https://www.insighttherapysolutions.com/)")
|
| 65 |
|
| 66 |
-
#
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
chunked([msg.content for msg in _chat_history], n=2)
|
| 93 |
-
)
|
| 94 |
-
|
| 95 |
-
response = rag_chain.stream(
|
| 96 |
-
{"question": prompt, "chat_history": _chat_history_tranform}
|
| 97 |
-
)
|
| 98 |
-
|
| 99 |
-
for res in response:
|
| 100 |
-
full_response += res or ""
|
| 101 |
-
message_placeholder.markdown(full_response + "|")
|
| 102 |
-
message_placeholder.markdown(full_response)
|
| 103 |
-
|
| 104 |
-
msgs.add_user_message(prompt)
|
| 105 |
-
msgs.add_ai_message(full_response)
|
| 106 |
-
|
| 107 |
-
except Exception as e:
|
| 108 |
-
st.error(f"An error occured. {e}")
|
|
|
|
| 63 |
st.sidebar.write("Reclaim Your Mental Health")
|
| 64 |
st.sidebar.markdown("[Visit us at](https://www.insighttherapysolutions.com/)")
|
| 65 |
|
| 66 |
+
# Add some custom styling
|
| 67 |
+
st.markdown(
|
| 68 |
+
"""
|
| 69 |
+
<style>
|
| 70 |
+
.css-18e3th9 {
|
| 71 |
+
padding-top: 3rem;
|
| 72 |
+
}
|
| 73 |
+
.css-1d391kg {
|
| 74 |
+
text-align: center;
|
| 75 |
+
}
|
| 76 |
+
.stButton>button {
|
| 77 |
+
background-color: #4CAF50;
|
| 78 |
+
color: white;
|
| 79 |
+
border: none;
|
| 80 |
+
padding: 15px 32px;
|
| 81 |
+
text-align: center;
|
| 82 |
+
text-decoration: none;
|
| 83 |
+
display: inline-block;
|
| 84 |
+
font-size: 16px;
|
| 85 |
+
margin: 4px 2px;
|
| 86 |
+
cursor: pointer;
|
| 87 |
+
border-radius: 8px;
|
| 88 |
+
}
|
| 89 |
+
</style>
|
| 90 |
+
""", unsafe_allow_html=True
|
| 91 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|