Spaces:
Sleeping
Sleeping
Akshayram1
commited on
Commit
•
6824ee6
1
Parent(s):
0635601
Update app.py
Browse files
app.py
CHANGED
@@ -89,14 +89,7 @@ st.markdown("""
|
|
89 |
background-color: #fff;
|
90 |
padding: 10px 0;
|
91 |
}
|
92 |
-
|
93 |
-
background-color: white;
|
94 |
-
max-height: 400px;
|
95 |
-
width: 100%;
|
96 |
-
overflow-y: scroll;
|
97 |
-
padding: 15px;
|
98 |
-
border: 1px solid #ddd;
|
99 |
-
}
|
100 |
</style>
|
101 |
""", unsafe_allow_html=True)
|
102 |
|
@@ -106,7 +99,7 @@ output_container = st.empty() # This will hold the dynamic content
|
|
106 |
# Function to display the chat history in the white box
|
107 |
def display_chat():
|
108 |
with output_container.container(): # Use the white box for output
|
109 |
-
|
110 |
# Loop through session messages and display them
|
111 |
for message in st.session_state['messages']:
|
112 |
if message['role'] == 'user':
|
@@ -115,7 +108,7 @@ def display_chat():
|
|
115 |
st.write(f"**Bot:** {message['content']}")
|
116 |
# Add a separator after each bot message
|
117 |
st.markdown("<hr style='border:1px dashed;'>", unsafe_allow_html=True)
|
118 |
-
|
119 |
|
120 |
# Input container (This will stay at the bottom)
|
121 |
input_container = st.container()
|
|
|
89 |
background-color: #fff;
|
90 |
padding: 10px 0;
|
91 |
}
|
92 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
</style>
|
94 |
""", unsafe_allow_html=True)
|
95 |
|
|
|
99 |
# Function to display the chat history in the white box
|
100 |
def display_chat():
|
101 |
with output_container.container(): # Use the white box for output
|
102 |
+
|
103 |
# Loop through session messages and display them
|
104 |
for message in st.session_state['messages']:
|
105 |
if message['role'] == 'user':
|
|
|
108 |
st.write(f"**Bot:** {message['content']}")
|
109 |
# Add a separator after each bot message
|
110 |
st.markdown("<hr style='border:1px dashed;'>", unsafe_allow_html=True)
|
111 |
+
|
112 |
|
113 |
# Input container (This will stay at the bottom)
|
114 |
input_container = st.container()
|