소스 검색

update core to use new brain loader class

nico 8 년 전
부모
커밋
8e165c1ced
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 1
      core/NeuronModule.py
  2. 2 1
      kalliope.py

+ 2 - 1
core/NeuronModule.py

@@ -66,7 +66,8 @@ class NeuronModule(object):
         logger.debug("NeuronModule called from class %s with parameters: %s" % (child_name, str(kwargs)))
 
         self.settings = SettingLoader.get_settings()
-        self.brain = BrainLoader.get_brain()
+        brain_loader = BrainLoader.Intance()
+        self.brain = brain_loader.brain
 
         # check if the user has overrider the TTS
         tts = kwargs.get('tts', None)

+ 2 - 1
kalliope.py

@@ -61,7 +61,8 @@ def main():
     if args.brain_file:
         brain_file = args.brain_file
     # load the brain once
-    brain = BrainLoader.get_brain(file_path=brain_file)
+    brain_loader = BrainLoader.Intance(file_path=brain_file)
+    brain = brain_loader.brain
 
     # check the user provide a valid action
     if args.action not in ACTION_LIST: