Goodnight7 commited on
Commit
c6aba46
·
verified ·
1 Parent(s): c72bc08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -174,16 +174,16 @@ def continue_conversation(input, history):
174
  output = response['output']
175
 
176
  # Prepend the new input and output to the history (latest conversation comes first)
177
- history.insert(0, {"role": "Patient", "message": input})
178
- history.insert(0, {"role": "Doctor", "message": output})
179
 
180
  # Return the current response and the full history (hidden state)
181
  return output, history
182
 
183
  # Streamlit UI
184
  def main():
185
- st.set_page_config(page_title="Hydroponic AI Chatbot", page_icon="👨‍⚕️")
186
- st.title("Hydroponic AI Chatbot")
187
 
188
  # Initialize the conversation history
189
  if 'history' not in st.session_state:
 
174
  output = response['output']
175
 
176
  # Prepend the new input and output to the history (latest conversation comes first)
177
+ history.insert(0, {"role": "Agricultor", "message": input})
178
+ history.insert(0, {"role": "Hydroponic Agent", "message": output})
179
 
180
  # Return the current response and the full history (hidden state)
181
  return output, history
182
 
183
  # Streamlit UI
184
  def main():
185
+ st.set_page_config(page_title="Hydroponic AI Agent", page_icon="👨‍⚕️")
186
+ st.title("Hydroponic AI Agent")
187
 
188
  # Initialize the conversation history
189
  if 'history' not in st.session_state: