import streamlit as st import pandas as pd import joblib from model_interface.hf_model_store import get_artifact_path def inventory_management(): st.title("Inventory Management ") # Load the DataFrame from joblib file df = joblib.load(get_artifact_path("4_inventory_mangement/Final5.joblib")) # Step 1: Select Item Type item_type = st.selectbox( "Select Item Type", sorted(df["Item_Type"].unique()) ) df_type = df[df["Item_Type"] == item_type] # Step 2: Select Item SubType item_subtype = st.selectbox( "Select Item SubType", sorted(df_type["Item_SubType"].unique()) ) df_subtype = df_type[df_type["Item_SubType"] == item_subtype] # Step 3: Select Item Name item_name = st.selectbox( "Select Item Name", sorted(df_subtype["Item_Name"].unique()) ) df_name = df_subtype[df_subtype["Item_Name"] == item_name] # Step 4: Select Item Code item_code = st.selectbox( "Select Item Code", sorted(df_name["Item_Code"].unique()) ) df_code = df_name[df_name["Item_Code"] == item_code] # Step 5: Select Unit unit = st.selectbox( "Select Unit", sorted(df_code["Unit"].unique()) ) df_final = df_code[df_code["Unit"] == unit] st.subheader("Result:") # Display final 4 output columns st.write(df_final[["Safety_stock", "Minimum_level", "Maximum_level", "Reorder_quantity"]])