Spaces:
Runtime error
Runtime error
Harshad Bhandwaldar
commited on
Commit
·
6611fe9
1
Parent(s):
8124efd
model added
Browse files
app.py
CHANGED
|
@@ -72,11 +72,11 @@ def getResponse(ints, intents_json):
|
|
| 72 |
def chatbot_response(msg, history):
|
| 73 |
history = history or []
|
| 74 |
s = list(sum(history, ()))
|
| 75 |
-
s.append(
|
| 76 |
inp = ' '.join(s)
|
| 77 |
ints = predict_class(msg, model)
|
| 78 |
res = getResponse(ints, intents)
|
| 79 |
-
history.append((
|
| 80 |
return history, history
|
| 81 |
|
| 82 |
|
|
|
|
| 72 |
def chatbot_response(msg, history):
|
| 73 |
history = history or []
|
| 74 |
s = list(sum(history, ()))
|
| 75 |
+
s.append(msg)
|
| 76 |
inp = ' '.join(s)
|
| 77 |
ints = predict_class(msg, model)
|
| 78 |
res = getResponse(ints, intents)
|
| 79 |
+
history.append((msg, res))
|
| 80 |
return history, history
|
| 81 |
|
| 82 |
|