hienbm commited on
Commit
547fc55
·
verified ·
1 Parent(s): b13ca23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -107,7 +107,14 @@ if user_query is not None and user_query != "":
107
  response = get_response(user_query, st.session_state.chat_history)
108
 
109
  # Remove any unwanted prefixes from the response
110
- response = response.replace("AI response:", "").replace("chat response:", "").replace("bot response:", "").strip()
 
 
 
 
 
 
 
111
 
112
  with st.chat_message("AI"):
113
  st.write(response)
 
107
  response = get_response(user_query, st.session_state.chat_history)
108
 
109
  # Remove any unwanted prefixes from the response
110
+ response = (
111
+ response
112
+ .replace("AI response:", "")
113
+ .replace("chat response:", "")
114
+ .replace("bot response:", "")
115
+ .replace("Desired Assistant Response:", "")
116
+ .strip()
117
+ )
118
 
119
  with st.chat_message("AI"):
120
  st.write(response)