Spaces:
Sleeping
Sleeping
Commit
·
c503b4d
1
Parent(s):
a56eb5a
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,7 +86,10 @@ if 'flowmessages' not in st.session_state:
|
|
| 86 |
|
| 87 |
]
|
| 88 |
with st.container():
|
| 89 |
-
#
|
|
|
|
|
|
|
|
|
|
| 90 |
for message in reversed(st.session_state["flowmessages"]):
|
| 91 |
if isinstance(message, AIMessage):
|
| 92 |
st.header("Doctor AI", divider=True)
|
|
@@ -95,9 +98,6 @@ with st.container():
|
|
| 95 |
st.header(":blue[You]", divider=True)
|
| 96 |
st.write(message.content)
|
| 97 |
|
| 98 |
-
# Create an empty space at the bottom
|
| 99 |
-
bottom_space = st.empty()
|
| 100 |
-
|
| 101 |
# Input box and form at the bottom
|
| 102 |
with st.form(key="my_form", clear_on_submit=True):
|
| 103 |
input_question = st.text_input("Type here.")
|
|
@@ -118,6 +118,6 @@ with st.container():
|
|
| 118 |
st.header(":blue[You]", divider=True)
|
| 119 |
st.write(message.content)
|
| 120 |
# Scroll to the bottom to show the latest input
|
| 121 |
-
|
| 122 |
else:
|
| 123 |
st.subheader("Error: Unable to get response. Please try again later.")
|
|
|
|
| 86 |
|
| 87 |
]
|
| 88 |
with st.container():
|
| 89 |
+
# Create an empty space at the top
|
| 90 |
+
top_space = st.empty()
|
| 91 |
+
|
| 92 |
+
# Display conversation history below the empty space
|
| 93 |
for message in reversed(st.session_state["flowmessages"]):
|
| 94 |
if isinstance(message, AIMessage):
|
| 95 |
st.header("Doctor AI", divider=True)
|
|
|
|
| 98 |
st.header(":blue[You]", divider=True)
|
| 99 |
st.write(message.content)
|
| 100 |
|
|
|
|
|
|
|
|
|
|
| 101 |
# Input box and form at the bottom
|
| 102 |
with st.form(key="my_form", clear_on_submit=True):
|
| 103 |
input_question = st.text_input("Type here.")
|
|
|
|
| 118 |
st.header(":blue[You]", divider=True)
|
| 119 |
st.write(message.content)
|
| 120 |
# Scroll to the bottom to show the latest input
|
| 121 |
+
top_space.markdown("<br>", unsafe_allow_html=True)
|
| 122 |
else:
|
| 123 |
st.subheader("Error: Unable to get response. Please try again later.")
|