devvibes commited on
Commit
a21a256
·
1 Parent(s): 4890122

Fix import errors for daemon compatibility

Browse files
haven_kitchen_os/__init__.py CHANGED
@@ -7,7 +7,11 @@ Features two AI personas:
7
  - 👩🏻‍🍳 Brie: Enthusiastic personal chef
8
  """
9
 
10
- from .main import HavenKitchenOs, get_shared_robot, set_shared_robot
 
 
 
 
11
 
12
  __version__ = "1.0.0"
13
  __author__ = "MindXpansion"
 
7
  - 👩🏻‍🍳 Brie: Enthusiastic personal chef
8
  """
9
 
10
+ # Handle imports for both package and standalone modes
11
+ try:
12
+ from .main import HavenKitchenOs, get_shared_robot, set_shared_robot
13
+ except ImportError:
14
+ from main import HavenKitchenOs, get_shared_robot, set_shared_robot
15
 
16
  __version__ = "1.0.0"
17
  __author__ = "MindXpansion"
haven_kitchen_os/animations.py CHANGED
@@ -118,7 +118,10 @@ def get_robot():
118
 
119
  # Try to get the shared robot from main.py (daemon mode)
120
  try:
121
- from . import get_shared_robot
 
 
 
122
  shared = get_shared_robot()
123
  if shared is not None:
124
  return shared
 
118
 
119
  # Try to get the shared robot from main.py (daemon mode)
120
  try:
121
+ try:
122
+ from . import get_shared_robot
123
+ except ImportError:
124
+ from main import get_shared_robot
125
  shared = get_shared_robot()
126
  if shared is not None:
127
  return shared
haven_kitchen_os/speech.py CHANGED
@@ -7,7 +7,7 @@ import os
7
  import time
8
  import threading
9
  import re
10
- from .animations import animate, stop_current_animation
11
 
12
  # Try to import ElevenLabs
13
  try:
 
7
  import time
8
  import threading
9
  import re
10
+ from animations import animate, stop_current_animation
11
 
12
  # Try to import ElevenLabs
13
  try: