Ericosmic commited on
Commit
868017f
·
verified ·
1 Parent(s): ab72f9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -87,7 +87,7 @@ st.sidebar.write(f"You're now chatting with **{selected_model}**")
87
  st.sidebar.markdown(model_info[selected_model]['description'])
88
  st.sidebar.image(model_info[selected_model]['logo'])
89
  st.sidebar.markdown("*Generated content may be inaccurate or false.*")
90
- #st.sidebar.markdown("\nLearn how to build this chatbot [here](https://ngebodh.github.io/projects/2024-03-05/).")
91
 
92
  if "prev_option" not in st.session_state:
93
  st.session_state.prev_option = selected_model
@@ -115,9 +115,9 @@ for message in st.session_state.messages:
115
 
116
 
117
  # Accept user input
118
- if prompt := st.chat_input(f"Hi I'm IELTS Writing Examiner, ask me a essay topic"):
119
 
120
- custom_instruction = "Act like a IELTS Writing Examiner in conversation"
121
 
122
  # Display user message in chat message container
123
  with st.chat_message("user"):
@@ -141,5 +141,4 @@ if prompt := st.chat_input(f"Hi I'm IELTS Writing Examiner, ask me a essay topic
141
  )
142
 
143
  response = st.write_stream(output)
144
- st.session_state.messages.append({"role": "assistant", "content": response})
145
-
 
87
  st.sidebar.markdown(model_info[selected_model]['description'])
88
  st.sidebar.image(model_info[selected_model]['logo'])
89
  st.sidebar.markdown("*Generated content may be inaccurate or false.*")
90
+ st.sidebar.markdown("\nLearn how to build this chatbot [here](https://ngebodh.github.io/projects/2024-03-05/).")
91
 
92
  if "prev_option" not in st.session_state:
93
  st.session_state.prev_option = selected_model
 
115
 
116
 
117
  # Accept user input
118
+ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
119
 
120
+ custom_instruction = "Act like a Human in conversation"
121
 
122
  # Display user message in chat message container
123
  with st.chat_message("user"):
 
141
  )
142
 
143
  response = st.write_stream(output)
144
+ st.session_state.messages.append({"role": "assistant", "content": response})