Priyanka-Kumavat-At-TE's picture
Update app.py
312261f
raw
history blame
1.01 kB
# User Test Function (Prediction Script)
# Import required libraries
import pandas as pd
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
import matplotlib.pyplot as plt
import pickle
import warnings
warnings.filterwarnings("ignore", category=UserWarning)
import streamlit as st
import os
st.title('Supply Chain Causal Analysis')
st.sidebar.header('Supply Chain Data')
# loading the save model
model = tf.keras.models.load_model(os.path.join('Weights_Updated','Best_model.tf'), compile=False)
# loading the product label encoding object
with open ('le_product.pkl','rb') as file:
le_product = pickle.load(file)
# loading the scaling object
with open ('scaler_scca.pkl','rb') as file1:
scaler = pickle.load(file1)