-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.py
25 lines (19 loc) · 771 Bytes
/
app.py
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
import streamlit as st
from data_processing import load_data, preprocess_data, display_data_analysis
from recommendation import display_product_recommendation
def main():
"""
Main function to run the Streamlit app.
"""
st.title("E-commerce Product Recommendation")
dataset_path = 'flipkart_com-ecommerce_sample.csv'
df = load_data(dataset_path)
if df is not None:
refined_df = preprocess_data(df)
option = st.sidebar.selectbox("Select an option", ("Data Analysis", "Product Recommendation"))
if option == "Data Analysis":
display_data_analysis(refined_df)
elif option == "Product Recommendation":
display_product_recommendation(refined_df)
if __name__ == '__main__':
main()