Update Home.py
Browse files
Home.py
CHANGED
|
@@ -2,68 +2,83 @@ import streamlit as st
|
|
| 2 |
import pandas as pd
|
| 3 |
import numpy as np
|
| 4 |
|
|
|
|
|
|
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
""", unsafe_allow_html=True)
|
| 10 |
st.markdown(
|
| 11 |
"""
|
| 12 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/dV0WXaXfOUrNjQmNQkspQ.jpeg" width="100%" />
|
| 13 |
""",
|
| 14 |
unsafe_allow_html=True
|
| 15 |
)
|
| 16 |
-
st.markdown("""
|
| 17 |
-
## Project Title: 📱Consumer Electronics Sales | EDA + Model 💻:
|
| 18 |
-
##### 📊 Data Exploration and Preprocessing:
|
| 19 |
-
- <span style="font-size:20px;">Preparing data by encoding categorical features like "ProductCategory" and "ProductBrand" and scaling numerical data such as "price" and "rating", as the dataset has minimal outliers or missing values.</span>
|
| 20 |
-
- <span style="font-size:20px;">Analyzing trends in **Product Categories**, **Brands**, **Prices**, **CustomerAge** etc., to identify influential factors.
|
| 21 |
-
##### 🤖 Predictive Modeling:
|
| 22 |
-
- <span style="font-size:20px;">**Target Variable**: Predicting key metrics like *PurchaseIntent*</span>
|
| 23 |
-
- <span style="font-size:20px;">**Model Selection**: Building ML models such as **KNN**, "Logistic Regression" and "Support Vector Machine"** for classification task</span>
|
| 24 |
-
- <span style="font-size:20px;">**Feature Engineering**: Extracting insights from **ProductCategory**, **ProductBrand** and label encoding.</span>
|
| 25 |
-
##### 📈 Model Evaluation:
|
| 26 |
-
- <span style="font-size:20px;">Comparing model performance using metrics like **accuracy**, **F1 score**, or **Log-loss score**, depending on the task.</span>
|
| 27 |
-
- <span style="font-size:20px;">Employing techniques like **hyperparameter tuning** and **cross-validation** for optimization.</span>
|
| 28 |
-
##### By integrating **machine learning** with **data analysis**, this project empowers Electronics market to enhance customer satisfaction, optimize pricing strategies according to purchase intent, and maximize profitability.
|
| 29 |
-
""", unsafe_allow_html=True)
|
| 30 |
-
|
| 31 |
-
# # Display an image from a file
|
| 32 |
-
st.subheader("Hotel Data Analysis Model Creation Flow")
|
| 33 |
-
st.markdown("")
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
#
|
| 40 |
st.markdown(
|
| 41 |
-
|
| 42 |
<style>
|
| 43 |
-
.stApp {
|
| 44 |
background-image: url("https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/cQN7GOIFQytVGZ-UzJYcR.jpeg");
|
| 45 |
background-size: cover;
|
| 46 |
background-position: center;
|
| 47 |
height: 100vh;
|
| 48 |
-
}
|
| 49 |
|
| 50 |
/* Semi-transparent overlay */
|
| 51 |
-
.stApp::before {
|
| 52 |
content: "";
|
| 53 |
position: absolute;
|
| 54 |
top: 0;
|
| 55 |
left: 0;
|
| 56 |
width: 100%;
|
| 57 |
height: 100%;
|
| 58 |
-
background: rgba(0, 0, 0, 0.4); /*
|
| 59 |
z-index: -1;
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
|
|
|
|
|
|
| 66 |
</style>
|
| 67 |
""",
|
| 68 |
-
unsafe_allow_html=True
|
| 69 |
-
)
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
import numpy as np
|
| 4 |
|
| 5 |
+
# Page configuration
|
| 6 |
+
st.set_page_config(page_title="Electronics Sales Analysis", layout="wide")
|
| 7 |
|
| 8 |
+
# Title with updated color
|
| 9 |
+
st.markdown(
|
| 10 |
+
"""
|
| 11 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/dV0WXaXfOUrNjQmNQkspQ.jpeg" width="150%" height="150%" />
|
| 12 |
+
""",
|
| 13 |
+
unsafe_allow_html=True
|
| 14 |
+
)
|
| 15 |
|
| 16 |
+
|
| 17 |
+
# Banner image
|
|
|
|
| 18 |
st.markdown(
|
| 19 |
"""
|
| 20 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/dV0WXaXfOUrNjQmNQkspQ.jpeg" width="100%" />
|
| 21 |
""",
|
| 22 |
unsafe_allow_html=True
|
| 23 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
# Project description
|
| 26 |
+
st.markdown(
|
| 27 |
+
"""
|
| 28 |
+
<div style="text-align:justify; font-size:20px; color:white;">
|
| 29 |
+
## Project Title: 📱Consumer Electronics Sales | EDA + Model 💻:
|
| 30 |
+
##### 📊 Data Exploration and Preprocessing:
|
| 31 |
+
- Preparing data by encoding categorical features like "ProductCategory" and "ProductBrand" and scaling numerical data such as "price" and "rating", as the dataset has minimal outliers or missing values.
|
| 32 |
+
- Analyzing trends in **Product Categories**, **Brands**, **Prices**, **CustomerAge**, etc., to identify influential factors.
|
| 33 |
+
##### 🤖 Predictive Modeling:
|
| 34 |
+
- **Target Variable**: Predicting key metrics like *PurchaseIntent*.
|
| 35 |
+
- **Model Selection**: Building ML models such as **KNN**, **Logistic Regression**, and **Support Vector Machine** for classification tasks.
|
| 36 |
+
- **Feature Engineering**: Extracting insights from **ProductCategory**, **ProductBrand**, and label encoding.
|
| 37 |
+
##### 📈 Model Evaluation:
|
| 38 |
+
- Comparing model performance using metrics like **accuracy**, **F1 score**, or **Log-loss score**, depending on the task.
|
| 39 |
+
- Employing techniques like **hyperparameter tuning** and **cross-validation** for optimization.
|
| 40 |
+
##### By integrating **machine learning** with **data analysis**, this project empowers the Electronics market to enhance customer satisfaction, optimize pricing strategies according to purchase intent, and maximize profitability.
|
| 41 |
+
</div>
|
| 42 |
+
""",
|
| 43 |
+
unsafe_allow_html=True
|
| 44 |
+
)
|
| 45 |
|
| 46 |
+
# Subheader and flowchart image
|
| 47 |
+
st.subheader("Hotel Data Analysis Model Creation Flow")
|
| 48 |
+
st.markdown(
|
| 49 |
+
""
|
| 50 |
+
)
|
| 51 |
|
| 52 |
+
# Custom background with overlay
|
| 53 |
st.markdown(
|
| 54 |
+
"""
|
| 55 |
<style>
|
| 56 |
+
.stApp {
|
| 57 |
background-image: url("https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/cQN7GOIFQytVGZ-UzJYcR.jpeg");
|
| 58 |
background-size: cover;
|
| 59 |
background-position: center;
|
| 60 |
height: 100vh;
|
| 61 |
+
}
|
| 62 |
|
| 63 |
/* Semi-transparent overlay */
|
| 64 |
+
.stApp::before {
|
| 65 |
content: "";
|
| 66 |
position: absolute;
|
| 67 |
top: 0;
|
| 68 |
left: 0;
|
| 69 |
width: 100%;
|
| 70 |
height: 100%;
|
| 71 |
+
background: rgba(0, 0, 0, 0.4); /* 40% transparency */
|
| 72 |
z-index: -1;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
/* Styling the markdown text for better readability */
|
| 76 |
+
.stMarkdown {
|
| 77 |
+
text-align: justify; /* Spread content across width */
|
| 78 |
+
font-size: 20px; /* Better font size for readability */
|
| 79 |
+
color: white; /* Contrast color on dark background */
|
| 80 |
+
}
|
| 81 |
</style>
|
| 82 |
""",
|
| 83 |
+
unsafe_allow_html=True
|
| 84 |
+
)
|