-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
65 lines (54 loc) · 2.63 KB
/
Copy pathapp.py
File metadata and controls
65 lines (54 loc) · 2.63 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# --------------------------------------Import Packaeges-------------------------------------------#
from src.components.data_loader import load_data
from streamlit_option_menu import option_menu
from src.components.data_processor import process_data
from src.components.data_visulization import visulaize_data
from src.components.feature_engnering import custom_feature_engnering
from src.model_training.train_model import model_trainer
from src.utils import chatbot_ui
import streamlit as st
import pandas as pd
#--------------------------------------------------------------------------------------------------#
#------------------------------------Session State variable----------------------------------------#
#-----------------------------------Page Layout----------------------------------------------------#
def layout():
selected = option_menu(
menu_title=None,
options=["Getting Data", 'Processing Data','Visulaize Data','Feature Engnering',"Model Building"],
icons=['📥', '⚙️', '📊', '🛠️'],
menu_icon="Data Cleaning",
default_index=0,
orientation="horizontal"
)
# add a chat ui
chatbot_ui()
return selected
#--------------------------------------------------------------------------------------------------#
if __name__=="__main__":
#====================================Page Configration=========================================#
st.set_page_config(
page_title="Data Science App",
page_icon="🧊",
layout="wide",
initial_sidebar_state="expanded",
)
option=layout()
#====================================Loading Data Phase=========================================#
if option == "Getting Data":
load_data()
#=====================================Data Preprocessing Phase==================================#
elif option == "Processing Data":
df=st.session_state['data']
process_data(df=df)
#====================================Data Visulization Phase====================================#
elif option == "Visulaize Data":
df=st.session_state['data']
visulaize_data(df=df)
#=====================================Feature Engnering=========================================#
elif option == 'Feature Engnering':
df=st.session_state['data']
custom_feature_engnering(df=df)
#=====================================Model Building Phase==================================#
elif option == "Model Building":
df=st.session_state["data"]
model_trainer(df=df)