Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -148,7 +148,14 @@ def parse(category, chatbot):
|
|
148 |
"""Takes the chatbot prompt and response and updates the extracted information"""
|
149 |
global PARSING_REGEXP
|
150 |
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
category = Category[category]
|
153 |
chain = categories.category_modules[category].chain
|
154 |
yield {"status": "Parsing response..."}
|
|
|
148 |
"""Takes the chatbot prompt and response and updates the extracted information"""
|
149 |
global PARSING_REGEXP
|
150 |
|
151 |
+
if chatbot:
|
152 |
+
if len(chatbot) > 0:
|
153 |
+
answer = chatbot[0][1]
|
154 |
+
else:
|
155 |
+
answer = ""
|
156 |
+
else:
|
157 |
+
answer = ""
|
158 |
+
|
159 |
category = Category[category]
|
160 |
chain = categories.category_modules[category].chain
|
161 |
yield {"status": "Parsing response..."}
|