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