Your Name commited on
Commit
f539d04
·
1 Parent(s): 7b6c449
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -38,8 +38,6 @@ if user_input:
38
  st.session_state.past.append(user_input)
39
  st.session_state.generated.append(output)
40
 
41
- if st.session_state["generated"]:
42
-
43
- for i in range(len(st.session_state["generated"]) - 1, -1, -1):
44
- message(st.session_state["generated"][i], key=str(i))
45
- message(st.session_state["past"][i], is_user=True, key=str(i) + "_user")
 
38
  st.session_state.past.append(user_input)
39
  st.session_state.generated.append(output)
40
 
41
+ for i in reversed(range(len(st.session_state["generated"]))):
42
+ message(st.session_state["generated"][i], key=str(i))
43
+ message(st.session_state["past"][i], is_user=True, key=str(i) + "_user")