File size: 852 Bytes
2c1bfb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import streamlit as st
import pandas as pd

st.set_page_config(page_title="Customer Recommendations", page_icon=":chart_with_upwards_trend:")

st.title("Customer Recommendations")
st.markdown("""
    Get tailored recommendations for your customers based on their purchasing history.
""")

# Cargar los datos
uploaded_file = st.file_uploader("Upload your CSV file", type="csv")
if uploaded_file:
    df = pd.read_csv(uploaded_file)
    customer_id = st.selectbox("Select a Customer", df["CLIENTE"].unique())

    # Mostrar datos y recomendación
    st.write(f"### Purchase History for Customer {customer_id}")
    customer_data = df[df["CLIENTE"] == customer_id]
    st.write(customer_data)

    # Generar recomendaciones (placeholder)
    st.write(f"### Recommended Products for Customer {customer_id}")
    st.write("Product A, Product B, Product C")