trohith89's picture
Update Home.py
3d54f13 verified
raw
history blame
3.44 kB
import streamlit as st
import pandas as pd
import numpy as np
st.markdown("""
<h1 style="text-align:center; color:red;">Electronics Sales Analysis & Machine Learning Model</h1>
""", unsafe_allow_html=True)
st.markdown(
"""
<img src="https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/dV0WXaXfOUrNjQmNQkspQ.jpeg" width="100%" />
""",
unsafe_allow_html=True
)
st.markdown("""
## Project Title: 📱Consumer Electronics Sales | EDA + Model 💻:
##### 📊 Data Exploration and Preprocessing:
- <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>
- <span style="font-size:20px;">Analyzing trends in **Product Categories**, **Brands**, **Prices**, **CustomerAge** etc., to identify influential factors.
##### 🤖 Predictive Modeling:
- <span style="font-size:20px;">**Target Variable**: Predicting key metrics like *PurchaseIntent*</span>
- <span style="font-size:20px;">**Model Selection**: Building ML models such as **KNN**, "Logistic Regression" and "Support Vector Machine"** for classification task</span>
- <span style="font-size:20px;">**Feature Engineering**: Extracting insights from **ProductCategory**, **ProductBrand** and label encoding.</span>
##### 📈 Model Evaluation:
- <span style="font-size:20px;">Comparing model performance using metrics like **accuracy**, **F1 score**, or **Log-loss score**, depending on the task.</span>
- <span style="font-size:20px;">Employing techniques like **hyperparameter tuning** and **cross-validation** for optimization.</span>
##### 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.
""", unsafe_allow_html=True)
# # Display an image from a file
st.subheader("Hotel Data Analysis Model Creation Flow")
st.markdown("![classification=project-flowchart.gif](https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/BNnk1RdpWhdjTnW9Wm5gA.gif)")
# Define the URL of the background image (use your own image URL)
# background_image_url = "https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/FlisTFfpU7flDCWj_KttH.jpeg"
# Apply custom CSS for the background image and overlay
st.markdown(
f"""
<style>
.stApp {{
background-image: url("https://cdn-uploads.huggingface.co/production/uploads/67441c51a784a9d15cb12871/cQN7GOIFQytVGZ-UzJYcR.jpeg");
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: white; /* White text to ensure visibility */
font-size: 30px; /* Adjust font size for better readability */
}}
</style>
""",
unsafe_allow_html=True
)