muqeet1234's picture
Update app.py
2de6328 verified
import streamlit as st
import pandas as pd
# Set the background image using custom CSS
st.markdown(
"""
<style>
body {
background-image: url('https://example.com/background-image.jpg'); /* Replace with your image URL */
background-size: cover;
background-position: center;
color: white;
font-family: 'Arial', sans-serif;
}
.sidebar .sidebar-content {
background-color: rgba(255, 255, 255, 0.8); /* Add transparency for the sidebar */
padding: 15px;
}
h1, h2, h3, h4, h5 {
color: white;
}
</style>
""",
unsafe_allow_html=True,
)
# Sidebar content: Beautiful description about healthcare
st.sidebar.title("Health Nail Care")
st.sidebar.write("""
Nail care is essential for maintaining healthy, strong, and beautiful nails. Proper nail care involves regular cleaning,
trimming, and moisturizing. Nails should be protected from harmful chemicals and physical trauma. Eating a balanced diet
rich in vitamins, minerals, and protein is crucial for optimal nail health. Regularly checking for nail infections or
abnormalities can help in early detection and treatment.
Here are some tips for healthy nails:
- Keep nails clean and trimmed.
- Use a moisturizing lotion or oil for your nails.
- Avoid biting nails and using them as tools.
- Apply a base coat before using nail polish to prevent staining.
- Make sure to stay hydrated and eat a balanced diet rich in biotin, zinc, and iron.
""")
# Main content: Amazon PPC Keyword Optimizer
st.title("Amazon PPC Keyword Optimizer")
st.write("""
**Description**: Suggest optimal keywords for Amazon PPC campaigns based on product details, target audience, and existing keywords.
### Input Fields:
- **Product Details**: Name, Category, Features
- **Target Audience**: Gender, Age Range, Location
- **Existing Keywords**: Current keywords used in PPC campaigns
""")
# Input Fields
st.header("Product and Audience Details")
product_name = st.text_input("Enter product name")
product_category = st.selectbox("Select product category", ["Electronics", "Clothing", "Home", "Beauty", "Toys"])
product_features = st.text_area("Enter key product features (e.g., color, size, functionality)")
st.header("Target Audience")
audience_gender = st.selectbox("Select audience gender", ["Male", "Female", "Unisex"])
audience_age = st.slider("Select audience age range", min_value=18, max_value=65, value=(25, 45))
audience_location = st.text_input("Enter target location (e.g., USA, UK)")
st.header("Existing Product Keywords")
keywords_input = st.text_area("Enter current product keywords (comma-separated)")
# Function to generate recommended keywords
def generate_keywords(product_category, product_features, audience_gender, audience_age, audience_location, keywords_input):
keywords = set(keywords_input.split(","))
# Add product-specific features
features_keywords = product_features.split(",")
for feature in features_keywords:
keywords.add(feature.strip())
# Add category-related keywords
category_keywords = {
"Electronics": ["gadgets", "tech", "smartphone", ] }