fernandobriann commited on
Commit
8ebaef0
·
verified ·
1 Parent(s): 3b25368

Upload streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +5 -2
src/streamlit_app.py CHANGED
@@ -4,12 +4,15 @@ import pandas as pd
4
  import seaborn as sns
5
  import matplotlib.pyplot as plt
6
  from prediction import predict
 
7
 
8
  # ================================
9
  # Load model & preprocessor
10
  # ================================
11
- model = joblib.load('rf_model.pkl')
12
- prep = joblib.load('preprocessor.pkl')
 
 
13
 
14
  # ================================
15
  # Sidebar Navigation
 
4
  import seaborn as sns
5
  import matplotlib.pyplot as plt
6
  from prediction import predict
7
+ import os
8
 
9
  # ================================
10
  # Load model & preprocessor
11
  # ================================
12
+ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
13
+
14
+ model = joblib.load(os.path.join(BASE_DIR, 'rf_model.pkl'))
15
+ prep = joblib.load(os.path.join(BASE_DIR, 'preprocessor.pkl'))
16
 
17
  # ================================
18
  # Sidebar Navigation