Spaces:
Runtime error
Runtime error
nurindahpratiwi
commited on
Commit
·
7bd10c0
1
Parent(s):
661de0c
update
Browse files
app.py
CHANGED
|
@@ -139,11 +139,53 @@ with st.form(key="customer-information"):
|
|
| 139 |
|
| 140 |
if st.session_state.clicked:
|
| 141 |
# The message and nested widget will remain on the page
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
#predict(gender,SeniorCitizen,Partner,Dependents, tenure, PhoneService,MultipleLines,
|
| 149 |
#InternetService,OnlineSecurity,OnlineBackup,DeviceProtection,TechSupport,StreamingTV,StreamingMovies,
|
|
|
|
| 139 |
|
| 140 |
if st.session_state.clicked:
|
| 141 |
# The message and nested widget will remain on the page
|
| 142 |
+
|
| 143 |
+
df = pd.DataFrame({
|
| 144 |
+
'gender': [gender],
|
| 145 |
+
'SeniorCitizen': [SeniorCitizen],
|
| 146 |
+
'Partner': [Partner],
|
| 147 |
+
'Dependents': [Dependents],
|
| 148 |
+
'tenure': [tenure],
|
| 149 |
+
'PhoneService': [PhoneService],
|
| 150 |
+
'MultipleLines': [MultipleLines],
|
| 151 |
+
'InternetService': [InternetService],
|
| 152 |
+
'OnlineSecurity': [OnlineSecurity],
|
| 153 |
+
'OnlineBackup': [OnlineBackup],
|
| 154 |
+
'DeviceProtection': [DeviceProtection],
|
| 155 |
+
'TechSupport': [TechSupport],
|
| 156 |
+
'StreamingTV': [StreamingTV],
|
| 157 |
+
'StreamingMovies': [StreamingMovies],
|
| 158 |
+
'Contract': [Contract],
|
| 159 |
+
'PaperlessBilling': [PaperlessBilling],
|
| 160 |
+
'PaymentMethod': [PaymentMethod],
|
| 161 |
+
'MonthlyCharges': [MonthlyCharges],
|
| 162 |
+
'TotalCharges': [TotalCharges]
|
| 163 |
+
})
|
| 164 |
+
st.dataframe(
|
| 165 |
+
df,
|
| 166 |
+
column_config={
|
| 167 |
+
'gender': "gender",
|
| 168 |
+
'SeniorCitizen': "SeniorCitizen",
|
| 169 |
+
'Partner': "Partner",
|
| 170 |
+
'Dependents': "Dependents",
|
| 171 |
+
'tenure': "tenure",
|
| 172 |
+
'PhoneService': "PhoneService",
|
| 173 |
+
'MultipleLines': "MultipleLines",
|
| 174 |
+
'InternetService': "InternetService",
|
| 175 |
+
'OnlineSecurity': "OnlineSecurity",
|
| 176 |
+
'OnlineBackup': "OnlineBackup",
|
| 177 |
+
'DeviceProtection': "DeviceProtection",
|
| 178 |
+
'TechSupport': "TechSupport",
|
| 179 |
+
'StreamingTV': "StreamingTV",
|
| 180 |
+
'StreamingMovies': "StreamingMovies",
|
| 181 |
+
'Contract': "Contract",
|
| 182 |
+
'PaperlessBilling': "PaperlessBilling",
|
| 183 |
+
'PaymentMethod': "PaymentMethod",
|
| 184 |
+
'MonthlyCharges': "MonthlyCharges",
|
| 185 |
+
'TotalCharges': "TotalCharges"
|
| 186 |
+
},
|
| 187 |
+
hide_index=True,
|
| 188 |
+
)
|
| 189 |
|
| 190 |
#predict(gender,SeniorCitizen,Partner,Dependents, tenure, PhoneService,MultipleLines,
|
| 191 |
#InternetService,OnlineSecurity,OnlineBackup,DeviceProtection,TechSupport,StreamingTV,StreamingMovies,
|