Spaces:
Runtime error
Runtime error
Update codriao_tb_module.py
Browse files- codriao_tb_module.py +3 -5
codriao_tb_module.py
CHANGED
@@ -6,22 +6,20 @@ if TYPE_CHECKING:
|
|
6 |
import sys
|
7 |
import os
|
8 |
|
9 |
-
# Ensure Python can detect the correct module location
|
10 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
11 |
-
sys.path.append(BASE_DIR) #
|
|
|
12 |
|
13 |
try:
|
14 |
from tb_image_processor import TBImageProcessor
|
15 |
from tb_audio_processor import TBAudioProcessor
|
16 |
except ModuleNotFoundError:
|
17 |
-
# Try importing from 'modules' if files are inside it
|
18 |
-
sys.path.append(os.path.join(BASE_DIR, "modules"))
|
19 |
try:
|
20 |
from modules.tb_image_processor import TBImageProcessor
|
21 |
from modules.tb_audio_processor import TBAudioProcessor
|
22 |
except ModuleNotFoundError:
|
23 |
raise ImportError("❌ Could not locate tb_image_processor.py or tb_audio_processor.py. Ensure they are in the root directory or inside 'modules/'.")
|
24 |
-
|
25 |
class CodriaoHealthModule:
|
26 |
"""Embedded compassionate TB detection within Codriao's architecture"""
|
27 |
|
|
|
6 |
import sys
|
7 |
import os
|
8 |
|
|
|
9 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
10 |
+
sys.path.append(BASE_DIR) # Ensure base directory is included
|
11 |
+
sys.path.append(os.path.join(BASE_DIR, "modules")) # Ensure 'modules/' is included
|
12 |
|
13 |
try:
|
14 |
from tb_image_processor import TBImageProcessor
|
15 |
from tb_audio_processor import TBAudioProcessor
|
16 |
except ModuleNotFoundError:
|
|
|
|
|
17 |
try:
|
18 |
from modules.tb_image_processor import TBImageProcessor
|
19 |
from modules.tb_audio_processor import TBAudioProcessor
|
20 |
except ModuleNotFoundError:
|
21 |
raise ImportError("❌ Could not locate tb_image_processor.py or tb_audio_processor.py. Ensure they are in the root directory or inside 'modules/'.")
|
22 |
+
|
23 |
class CodriaoHealthModule:
|
24 |
"""Embedded compassionate TB detection within Codriao's architecture"""
|
25 |
|