igrisds commited on
Commit
28522a8
1 Parent(s): f8f734d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -106,9 +106,6 @@ def ask_ds(message, history):
106
  yield None
107
 
108
  if authenticated == False:
109
-
110
- yield message
111
-
112
  divisions = {'1': 'ime', '2': 'pas', '3': 'peer disability'}
113
  if division == None:
114
  if message.lower().strip() in list(divisions.values()):
@@ -126,12 +123,14 @@ def ask_ds(message, history):
126
  employee_type = message.lower().strip()
127
  authenticated = True
128
  EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{employee_type}', employee_type).replace('{division}', division[:3])
 
129
  extractions = read_json_from_s3()
130
  yield "Welcome to Ask Dane Street! Whether you're new to the team or just looking for some quick information, I'm here to guide you through our company's literature and platform. Simply ask your question, and I'll provide you with the most relevant information I can."
131
  elif message.lower().strip() in list(employee_types.keys()):
132
  employee_type = employee_types[message.lower().strip()]
133
  authenticated = True
134
  EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{employee_type}', employee_type).replace('{division}', division[:3])
 
135
  extractions = read_json_from_s3()
136
  yield "Welcome to Ask Dane Street! Whether you're new to the team or just looking for some quick information, I'm here to guide you through our company's literature and platform. Simply ask your question, and I'll provide you with the most relevant information I can."
137
  else:
 
106
  yield None
107
 
108
  if authenticated == False:
 
 
 
109
  divisions = {'1': 'ime', '2': 'pas', '3': 'peer disability'}
110
  if division == None:
111
  if message.lower().strip() in list(divisions.values()):
 
123
  employee_type = message.lower().strip()
124
  authenticated = True
125
  EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{employee_type}', employee_type).replace('{division}', division[:3])
126
+ yield EXTRACTIONS_PATH
127
  extractions = read_json_from_s3()
128
  yield "Welcome to Ask Dane Street! Whether you're new to the team or just looking for some quick information, I'm here to guide you through our company's literature and platform. Simply ask your question, and I'll provide you with the most relevant information I can."
129
  elif message.lower().strip() in list(employee_types.keys()):
130
  employee_type = employee_types[message.lower().strip()]
131
  authenticated = True
132
  EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{employee_type}', employee_type).replace('{division}', division[:3])
133
+ yield EXTRACTIONS_PATH
134
  extractions = read_json_from_s3()
135
  yield "Welcome to Ask Dane Street! Whether you're new to the team or just looking for some quick information, I'm here to guide you through our company's literature and platform. Simply ask your question, and I'll provide you with the most relevant information I can."
136
  else: