Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples/brain.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysamples/brain.py')
-rw-r--r--pysamples/brain.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pysamples/brain.py b/pysamples/brain.py
index 7ff50c2..5a2c0c4 100644
--- a/pysamples/brain.py
+++ b/pysamples/brain.py
@@ -96,7 +96,8 @@ Close other activities and try once more."
return kernel
kernel = None
- kernel = brain_load(kernel, get_default_voice())
- response_text = brain_respond(kernel, text)
+ if not hasattr(tw, 'aiml_kernel'):
+ tw.aiml_kernel = brain_load(tw, get_default_voice())
+ response_text = brain_respond(tw.aiml_kernel, text)
tw.lc.heap.append(response_text)
return