Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -99,16 +99,16 @@ if query:
|
|
99 |
|
100 |
response_container = st.container()
|
101 |
# container for text box
|
102 |
-
container = st.container()
|
103 |
-
|
104 |
-
with container:
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
99 |
|
100 |
response_container = st.container()
|
101 |
# container for text box
|
102 |
+
container = st.container()
|
103 |
+
|
104 |
+
with container:
|
105 |
+
if query:
|
106 |
+
output = response
|
107 |
+
st.session_state['past'].append(query)
|
108 |
+
st.session_state['generated'].append(output)
|
109 |
+
|
110 |
+
if st.session_state['generated']:
|
111 |
+
with response_container:
|
112 |
+
for i in range(len(st.session_state['generated'])):
|
113 |
+
message(st.session_state["past"][i], is_user=True, key=str(i) + '_user')
|
114 |
+
message(st.session_state["generated"][i], key=str(i))
|