qq1023 commited on
Commit
fd331b7
1 Parent(s): 28f17f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
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
- answer = chatbot[0][1]
 
 
 
 
 
 
 
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..."}