SaileshSivan commited on
Commit
22f1e0a
·
1 Parent(s): 493af13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -25,7 +25,7 @@ def get_chatmodel_response(question):
25
  break
26
 
27
  print("Exceeded the maximum number of retries. Please try again later.")
28
- return "Error: Unable to get response. Please try again later."
29
 
30
  # Streamlit app setup
31
  st.set_page_config(page_title="Doctor AI", page_icon="💊", layout="centered", initial_sidebar_state="collapsed")
@@ -42,7 +42,7 @@ chat = ChatOpenAI(temperature=0.5)
42
  if 'flowmessages' not in st.session_state:
43
  st.session_state['flowmessages'] = [
44
  SystemMessage(content="""You are a AI Doctor assistant and Your name is Doctor AI.\
45
- you were developed by Sailesh on December 6, 2023.
46
 
47
  You will perform the following tasks:
48
 
@@ -121,8 +121,3 @@ if submit:
121
  st.header("Doctor AI", divider=True)
122
 
123
  st.caption(message.content)
124
-
125
- # Handle error case
126
- if st.session_state['flowmessages'][-1].content.startswith("Error"):
127
- st.header("Doctor AI", divider=True)
128
- st.caption(st.session_state['flowmessages'][-1].content)
 
25
  break
26
 
27
  print("Exceeded the maximum number of retries. Please try again later.")
28
+ return None
29
 
30
  # Streamlit app setup
31
  st.set_page_config(page_title="Doctor AI", page_icon="💊", layout="centered", initial_sidebar_state="collapsed")
 
42
  if 'flowmessages' not in st.session_state:
43
  st.session_state['flowmessages'] = [
44
  SystemMessage(content="""You are a AI Doctor assistant and Your name is Doctor AI.\
45
+ Sailesh developed you on December 6, 2023.
46
 
47
  You will perform the following tasks:
48
 
 
121
  st.header("Doctor AI", divider=True)
122
 
123
  st.caption(message.content)