Synav commited on
Commit
31e94bf
·
verified ·
1 Parent(s): 9b08017

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +9 -0
src/streamlit_app.py CHANGED
@@ -8,6 +8,15 @@ from model_utils import load_model, load_model_ensemble, ensemble_predict
8
  from preprocess_utils import load_train_features
9
  from preprocess_utils import preprocess_pipeline as preprocess
10
  from inference_utils import add_predictions
 
 
 
 
 
 
 
 
 
11
  from src.survival_utils import (
12
  prepare_cox_df,
13
  fit_cox,
 
8
  from preprocess_utils import load_train_features
9
  from preprocess_utils import preprocess_pipeline as preprocess
10
  from inference_utils import add_predictions
11
+
12
+ import sys
13
+ from pathlib import Path
14
+
15
+ # Ensure repo root is on sys.path so "src.*" imports work on Hugging Face
16
+ ROOT = Path(__file__).resolve().parents[1] # /app
17
+ if str(ROOT) not in sys.path:
18
+ sys.path.insert(0, str(ROOT))
19
+
20
  from src.survival_utils import (
21
  prepare_cox_df,
22
  fit_cox,