Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Apr 29, 2024
1 parent 584e439 commit ca85aff
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions predictorK.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ def load_components_function(fp):
#To load the machine learning components saved to re-use in the app
return tf.keras.models.load_model(fp)

def load_components(fp):
# def load_components(fp):
#To load the machine learning components saved to re-use in the app
with open(fp,"rb") as f:
object = pickle.load(f)
return object

# return object

# Loading the machine learning components
def app():
DIRPATH = os.path.dirname(os.path.realpath(__file__))
ml_core_fp = os.path.join(DIRPATH,"Assets","telco_model.h5")
# DIRPATH = os.path.dirname(os.path.realpath(__file__))
ml_core_fp = os.path.join("Assets","telco_model.h5")
ml_components_dict = load_components_function(fp=ml_core_fp)
scaler_fp = os.path.join(DIRPATH,"Assets","scalerKer.pkl")
scaler_dict = load_components(fp=scaler_fp)
# scaler_fp = os.path.join("Assets","scalerKer.pkl")
with open("Assets/scalerKer.pkl","rb") as f:
scaler_dict = pickle.load(f)
# =
# load_components(fp=scaler_fp)


st.title(":1234: Telecom Churn App")
Expand Down

0 comments on commit ca85aff

Please sign in to comment.