Update app.py
Browse files
app.py
CHANGED
@@ -113,29 +113,31 @@ def ask_ds(message, history):
|
|
113 |
divisions = {'1': 'ime', '2': 'pas', '3': 'peer disability'}
|
114 |
if division == None:
|
115 |
if message.lower().strip() in list(divisions.values()):
|
116 |
-
division = message.lower().strip()
|
117 |
yield "[1] CSR\n[2] QA"
|
118 |
elif message.lower().strip() in list(divisions.keys()):
|
119 |
-
division = divisions[message.lower().strip()]
|
120 |
yield "[1] CSR\n[2] QA"
|
121 |
else:
|
122 |
yield "Please select a valid choice."
|
123 |
|
124 |
elif employee_type == None:
|
|
|
125 |
if division == 'peer disability':
|
126 |
division = 'dis'
|
|
|
127 |
employee_types = {'1': 'csr', '2': 'qa'}
|
128 |
if message.lower().strip() in list(employee_types.values()):
|
129 |
employee_type = message.lower().strip()
|
130 |
authenticated = True
|
131 |
-
EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{
|
132 |
yield EXTRACTIONS_PATH
|
133 |
extractions = read_json_from_s3()
|
134 |
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."
|
135 |
elif message.lower().strip() in list(employee_types.keys()):
|
136 |
employee_type = employee_types[message.lower().strip()]
|
137 |
authenticated = True
|
138 |
-
EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{employee_type}', employee_type).replace('{division}', division
|
139 |
yield EXTRACTIONS_PATH
|
140 |
extractions = read_json_from_s3()
|
141 |
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."
|
|
|
113 |
divisions = {'1': 'ime', '2': 'pas', '3': 'peer disability'}
|
114 |
if division == None:
|
115 |
if message.lower().strip() in list(divisions.values()):
|
116 |
+
division = message.lower().strip()
|
117 |
yield "[1] CSR\n[2] QA"
|
118 |
elif message.lower().strip() in list(divisions.keys()):
|
119 |
+
division = divisions[message.lower().strip()]
|
120 |
yield "[1] CSR\n[2] QA"
|
121 |
else:
|
122 |
yield "Please select a valid choice."
|
123 |
|
124 |
elif employee_type == None:
|
125 |
+
|
126 |
if division == 'peer disability':
|
127 |
division = 'dis'
|
128 |
+
|
129 |
employee_types = {'1': 'csr', '2': 'qa'}
|
130 |
if message.lower().strip() in list(employee_types.values()):
|
131 |
employee_type = message.lower().strip()
|
132 |
authenticated = True
|
133 |
+
EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{employee_type}', employee_type).replace('{division}', division)
|
134 |
yield EXTRACTIONS_PATH
|
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 |
elif message.lower().strip() in list(employee_types.keys()):
|
138 |
employee_type = employee_types[message.lower().strip()]
|
139 |
authenticated = True
|
140 |
+
EXTRACTIONS_PATH = EXTRACTIONS_PATH.replace('{employee_type}', employee_type).replace('{division}', division)
|
141 |
yield EXTRACTIONS_PATH
|
142 |
extractions = read_json_from_s3()
|
143 |
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."
|