qq1023 commited on
Commit
e3bb047
·
1 Parent(s): 65aa7c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -149,7 +149,10 @@ def parse(category, chatbot):
149
 
150
 
151
 
152
- answer = chatbot[0][1]
 
 
 
153
 
154
  if category not in Category.__members__:
155
  # Handle the case when an invalid category is provided
 
149
 
150
 
151
 
152
+ try:
153
+ answer = next(chatbot)[1]
154
+ except StopIteration:
155
+ answer = ""
156
 
157
  if category not in Category.__members__:
158
  # Handle the case when an invalid category is provided