| import streamlit as st |
| import pandas as pd |
| import numpy as np |
|
|
|
|
|
|
| st.markdown(""" |
| <h1 style="text-align:center; color:orange;">Electronics Sales Analysis & Machine Learning Model</h1> |
| """, unsafe_allow_html=True) |
| st.markdown( |
| """ |
| <img src="https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/xVwOaeWrDVPhsujGDoqng.png" width="100%" /> |
| """, |
| unsafe_allow_html=True |
| ) |
| st.markdown(""" |
| ## Predicting Customer Preferences and Optimizing Pricing: |
| ##### π Data Exploration and Preprocessing: |
| - <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> |
| - <span style="font-size:20px;">Analyzing trends in **customer reviews**, **cashback offers**, **discounts**, and **free services** to identify influential factors. |
| ##### π€ Predictive Modeling: |
| - <span style="font-size:20px;">**Target Variable**: Predicting key metrics like *price category*, *likelihood of cancellation*, or *hotel ratings.*</span> |
| - <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> |
| - <span style="font-size:20px;">**Feature Engineering**: Extracting insights from **review text** (via text sentiment analysis) or **free services** (binary encoding).</span> |
| ##### π Model Evaluation: |
| - <span style="font-size:20px;">Comparing model performance using metrics like **accuracy**, **F1 score**, or **RMSE**, depending on the task.</span> |
| - <span style="font-size:20px;">Employing techniques like **hyperparameter tuning** and **cross-validation** for optimization.</span> |
| ##### πΌ Insights and Deployment: |
| - <span style="font-size:20px;">Unveiling actionable insights from **feature importance** to guide hotel marketing and pricing strategies.</span> |
| - <span style="font-size:20px;">Deploying the model in a user-friendly interface to support stakeholders in making real-time decisions.</span> |
| ##### By integrating **machine learning** with **data analysis**, this project empowers hotel businesses to enhance customer satisfaction, optimize pricing strategies, and maximize profitability. |
| """, unsafe_allow_html=True) |
|
|
| |
| st.subheader("Hotel Data Analysis Model Creation Flow") |
| st.markdown("") |
|
|
|
|
| |
| background_image_url = "https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/FlisTFfpU7flDCWj_KttH.jpeg" |
|
|
| |
| st.markdown( |
| f""" |
| <style> |
| .stApp {{ |
| background-image: url("{background_image_url}"); |
| background-size: cover; |
| background-position: center; |
| height: 100vh; |
| }} |
| |
| /* Semi-transparent overlay */ |
| .stApp::before {{ |
| content: ""; |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 100%; |
| height: 100%; |
| background: rgba(0, 0, 0, 0.4); /* Adjust transparency here (0.4 for 40% transparency) */ |
| z-index: -1; |
| }} |
| /* Styling the content to ensure text visibility */ |
| .stMarkdown {{ |
| color: black; /* White text to ensure visibility */ |
| font-size: 30px; /* Adjust font size for better readability */ |
| }} |
| </style> |
| """, |
| unsafe_allow_html=True |
| ) |