File size: 970 Bytes
e59e6e4
 
 
 
 
 
 
 
46acc58
e59e6e4
 
 
 
 
 
 
349b16b
 
46acc58
349b16b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 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')

# 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)