Spaces:
Runtime error
Runtime error
Update codriao_tb_module.py
Browse files- codriao_tb_module.py +11 -2
codriao_tb_module.py
CHANGED
@@ -3,8 +3,17 @@ import logging
|
|
3 |
from typing import TYPE_CHECKING
|
4 |
if TYPE_CHECKING:
|
5 |
from CodriaoCore import CodriaoCore
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
logger = logging.getLogger(__name__)
|
10 |
|
|
|
3 |
from typing import TYPE_CHECKING
|
4 |
if TYPE_CHECKING:
|
5 |
from CodriaoCore import CodriaoCore
|
6 |
+
import sys
|
7 |
+
import os
|
8 |
+
|
9 |
+
# Ensure Python can find the TB processors
|
10 |
+
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
11 |
+
|
12 |
+
try:
|
13 |
+
from tb_image_processor import TBImageProcessor
|
14 |
+
from tb_audio_processor import TBAudioProcessor
|
15 |
+
except ModuleNotFoundError:
|
16 |
+
raise ImportError("Could not locate tb_image_processor.py or tb_audio_processor.py. Ensure they are in the root directory or 'modules/'.")
|
17 |
|
18 |
logger = logging.getLogger(__name__)
|
19 |
|