deepakkaura26 commited on
Commit
1ac990b
1 Parent(s): fe8f546

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -17
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
  import pandas as pd
3
- import plotly.express as px
4
- import plotly.graph_objects as go
5
 
6
  st.title("Customer Lifetime Value App")
7
 
@@ -34,24 +33,13 @@ user_data['Year'] = user_data['InvoiceDate'].dt.year
34
  # Plot the graphs
35
  st.subheader('Purchase Trend')
36
 
37
- # Day Wise
38
- fig = go.Figure()
39
- fig.add_trace(go.Scatter(x=user_data.Day, y=user_data.Quantity, mode='lines+markers', name='Day Wise'))
40
- st.plotly_chart(fig)
41
 
42
- # Date Wise
43
- fig1 = px.line(user_data, x="InvoiceDate", y="Quantity", title='Date Wise')
44
- st.plotly_chart(fig1)
45
 
46
- # Week Wise
47
- fig2 = go.Figure()
48
- fig2.add_trace(go.Scatter(x=user_data.Week, y=user_data.Quantity, mode='lines+markers', name='Week Wise'))
49
- st.plotly_chart(fig2)
50
 
51
- # Month Wise
52
- fig3 = go.Figure()
53
- fig3.add_trace(go.Scatter(x=user_data.Month, y=user_data.Quantity, mode='lines+markers', name='Month Wise'))
54
- st.plotly_chart(fig3)
55
 
56
  # Risk of Churn
57
  if clv <= 0:
 
1
  import streamlit as st
2
  import pandas as pd
3
+
 
4
 
5
  st.title("Customer Lifetime Value App")
6
 
 
33
  # Plot the graphs
34
  st.subheader('Purchase Trend')
35
 
 
 
 
 
36
 
 
 
 
37
 
 
 
 
 
38
 
39
+
40
+
41
+
42
+
43
 
44
  # Risk of Churn
45
  if clv <= 0: