S-Vetrivel commited on
Commit
35456ff
·
1 Parent(s): d72a730

Prioritize root in sys.path and add debug info

Browse files
Files changed (1) hide show
  1. app/main.py +3 -1
app/main.py CHANGED
@@ -2,7 +2,7 @@ import os
2
  import sys
3
 
4
  # Add project root to sys.path to allow importing 'src'
5
- sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
6
 
7
  import time
8
  import base64
@@ -15,6 +15,8 @@ from dotenv import load_dotenv
15
 
16
  # Import the new pipeline
17
  try:
 
 
18
  from src.pipeline.detector import VoicePipeline
19
  except ImportError as e:
20
  # Fallback or detailed error logging
 
2
  import sys
3
 
4
  # Add project root to sys.path to allow importing 'src'
5
+ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
6
 
7
  import time
8
  import base64
 
15
 
16
  # Import the new pipeline
17
  try:
18
+ import src
19
+ print(f"DEBUG: src module found at {src.__file__}")
20
  from src.pipeline.detector import VoicePipeline
21
  except ImportError as e:
22
  # Fallback or detailed error logging