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 ca85aff commit 9332c71
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions predictorK.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,11 @@
global churn_cutoff
churn_cutoff = 0.3

# Function to load machine learning components
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):
#To load the machine learning components saved to re-use in the app

# return object

# Loading the machine learning components
def app():
# 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("Assets","scalerKer.pkl")
with open("Assets/scalerKer.pkl","rb") as f:
ml_components_dict = tf.keras.models.load_model("./Assets/telco_model.h5")
with open("./Assets/scalerKer.pkl","rb") as f:
scaler_dict = pickle.load(f)
# =
# load_components(fp=scaler_fp)


st.title(":1234: Telecom Churn App")
st.write("""Welcome to ChurnShield Telecom Churn Prediction app!
Expand Down

0 comments on commit 9332c71

Please sign in to comment.