Mpavan45 commited on
Commit
24a5594
Β·
verified Β·
1 Parent(s): cb8bc34

Rename Hotel Data Card.py to Home.py

Browse files
Files changed (1) hide show
  1. Hotel Data Card.py β†’ Home.py +105 -0
Hotel Data Card.py β†’ Home.py RENAMED
@@ -27,3 +27,108 @@ st.markdown("""
27
 
28
  #### By integrating **machine learning** with **data analysis**, this project empowers hotel businesses to enhance customer satisfaction, optimize pricing strategies, and maximize profitability.
29
  """, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  #### By integrating **machine learning** with **data analysis**, this project empowers hotel businesses to enhance customer satisfaction, optimize pricing strategies, and maximize profitability.
29
  """, unsafe_allow_html=True)
30
+
31
+ import os
32
+ import pandas as pd
33
+ import streamlit as st
34
+
35
+ # Define a persistent file path for the dataset
36
+ DATA_FILE_PATH = "dataset.csv"
37
+
38
+ # Page Title
39
+ st.markdown("""
40
+ <h1 style="text-align:center; color:yellow;">Hotel Data Set</h1>
41
+ """, unsafe_allow_html=True)
42
+
43
+ # Sidebar Navigation
44
+ st.sidebar.title("Navigation")
45
+ page = st.sidebar.radio("Go to", ["Home", "Hotel Data", "Simple-EDA"])
46
+
47
+ # Load dataset into session state if not already loaded
48
+ if "dataset" not in st.session_state:
49
+ if os.path.exists(DATA_FILE_PATH):
50
+ st.session_state["dataset"] = pd.read_csv(DATA_FILE_PATH)
51
+ else:
52
+ st.session_state["dataset"] = None
53
+
54
+ # Home Page
55
+ if page == "Home":
56
+ st.title("Welcome to the Hotel Data App!")
57
+
58
+ # Add your new section for "Hotel Data Analysis & Machine Learning"
59
+ st.markdown("""
60
+ <h1 style="text-align:center; color:orange;">Hotel Data Analysis & Machine Learning</h1>
61
+ """, unsafe_allow_html=True)
62
+
63
+ st.markdown("""
64
+ ## Predicting Customer Preferences and Optimizing Pricing:
65
+ #### πŸ“Š Data Exploration and Preprocessing:
66
+ - <span style="font-size:20px;">Cleaning and preparing data by handling missing values, encoding categorical features like *"category"* and *"location,"* and normalizing numerical data such as *"price"* and *"rating."*</span>
67
+ - <span style="font-size:20px;">Analyzing trends in **customer reviews**, **cashback offers**, **discounts**, and **free services** to identify influential factors.</span>
68
+ #### πŸ€– Predictive Modeling:
69
+ - <span style="font-size:20px;">**Target Variable**: Predicting key metrics like *price category*, *likelihood of cancellation*, or *hotel ratings.*</span>
70
+ - <span style="font-size:20px;">**Model Selection**: Building ML models such as **Decision Trees**, **Random Forests**, or **Gradient Boosting** for classification or regression tasks.</span>
71
+ - <span style="font-size:20px;">**Feature Engineering**: Extracting insights from **review text** (via text sentiment analysis) or **free services** (binary encoding).</span>
72
+ #### πŸ“ˆ Model Evaluation:
73
+ - <span style="font-size:20px;">Comparing model performance using metrics like **accuracy**, **F1 score**, or **RMSE**, depending on the task.</span>
74
+ - <span style="font-size:20px;">Employing techniques like **hyperparameter tuning** and **cross-validation** for optimization.</span>
75
+ #### πŸ’Ό Insights and Deployment:
76
+ - <span style="font-size:20px;">Unveiling actionable insights from **feature importance** to guide hotel marketing and pricing strategies.</span>
77
+ - <span style="font-size:20px;">Deploying the model in a user-friendly interface to support stakeholders in making real-time decisions.</span>
78
+ #### By integrating **machine learning** with **data analysis**, this project empowers hotel businesses to enhance customer satisfaction, optimize pricing strategies, and maximize profitability.
79
+ """, unsafe_allow_html=True)
80
+
81
+ # st.info("Please upload a dataset to get started.")
82
+ elif page == "Hotel Data":
83
+ import pages.Hotel Data
84
+ elif page == "Simple-EDA":
85
+ import pages.Simple-EDA
86
+
87
+ # # File uploader to upload a new dataset
88
+ # uploaded_file = st.file_uploader("Choose a CSV file", type=["csv"])
89
+ # if uploaded_file is not None:
90
+ # # Read and save the uploaded dataset
91
+ # df = pd.read_csv(uploaded_file)
92
+ # df.to_csv(DATA_FILE_PATH, index=False)
93
+ # st.session_state["dataset"] = df
94
+
95
+ # st.success("Dataset uploaded and saved permanently!")
96
+ # st.subheader("Uploaded Dataset Preview:")
97
+ # st.write(df.head())
98
+
99
+ # # Page 1: Dataset Overview
100
+ # elif page == "Page 1":
101
+ # st.title("Page 1: Dataset Overview")
102
+
103
+ # # Access dataset from session state
104
+ # df = st.session_state.get("dataset")
105
+
106
+ # if df is not None:
107
+ # st.subheader("Dataset Preview:")
108
+ # st.write(df.head())
109
+
110
+ # st.subheader("Dataset Description:")
111
+ # st.write(df.describe())
112
+
113
+ # st.subheader("Dataset Shape (Rows, Columns):")
114
+ # st.write(df.shape)
115
+ # else:
116
+ # st.warning("No dataset found. Please upload a dataset on the Home page.")
117
+
118
+ # # Page 2: Data Analysis
119
+ # elif page == "Page 2":
120
+ # st.title("Page 2: Data Analysis")
121
+
122
+ # # Access dataset from session state
123
+ # df = st.session_state.get("dataset")
124
+
125
+ # if df is not None:
126
+ # st.subheader("Basic Analysis:")
127
+ # st.write(f"Number of Rows: {df.shape[0]}")
128
+ # st.write(f"Number of Columns: {df.shape[1]}")
129
+ # st.write("Column Names:", list(df.columns))
130
+
131
+ # # Add any specific analysis or visualization here
132
+ # else:
133
+ # st.warning("No dataset found. Please upload a dataset on the Home page.")
134
+