kaleidoskop-hug commited on
Commit
42ac914
1 Parent(s): 67a2453

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -48,7 +48,8 @@ def reset_conversation():
48
  st.session_state.messages = []
49
  return None
50
 
51
-
 
52
 
53
 
54
  # Define the available models
@@ -133,6 +134,7 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
133
  )
134
 
135
  response = st.write_stream(stream)
 
136
 
137
  except Exception as e:
138
  # st.empty()
@@ -153,4 +155,5 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
153
 
154
 
155
 
156
- st.session_state.messages.append({"role": "assistant", "content": response})
 
 
48
  st.session_state.messages = []
49
  return None
50
 
51
+ def retry_last():
52
+ return None
53
 
54
 
55
  # Define the available models
 
134
  )
135
 
136
  response = st.write_stream(stream)
137
+ st.button("retry", on_click=retry_last())
138
 
139
  except Exception as e:
140
  # st.empty()
 
155
 
156
 
157
 
158
+ st.session_state.messages.append({"role": "assistant", "content": response})
159
+