Singularity666 commited on
Commit
96a5494
·
1 Parent(s): 36256ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -116,17 +116,11 @@ if uploaded_file is not None:
116
  st.header("1-to-1 Consultation")
117
  st.write("Ask any questions you have about the radiology report:")
118
 
119
-
120
  user_input = st.text_input("Enter your question:")
121
  if user_input:
122
- state.chat_history.append(f"You: {user_input}")
123
  if user_input.lower() == "thank you":
124
- state.chat_history.append("Bot: You're welcome! If you have any more questions, feel free to ask.")
125
  else:
126
  # Add the OpenAI API call here and generate the answer to the user's question
127
  answer = chatbot_response(f"Answer to the user's question based on the generated radiology report: {user_input}")
128
- state.chat_history.append(f"Bot: {answer}")
129
-
130
- # Display the chat history
131
- for message in state.chat_history:
132
- st.write(message)
 
116
  st.header("1-to-1 Consultation")
117
  st.write("Ask any questions you have about the radiology report:")
118
 
 
119
  user_input = st.text_input("Enter your question:")
120
  if user_input:
 
121
  if user_input.lower() == "thank you":
122
+ st.write("Bot: You're welcome! If you have any more questions, feel free to ask.")
123
  else:
124
  # Add the OpenAI API call here and generate the answer to the user's question
125
  answer = chatbot_response(f"Answer to the user's question based on the generated radiology report: {user_input}")
126
+ st.write(f"Bot: {answer}")