Spaces:
Runtime error
Runtime error
Commit
·
f35ac9c
1
Parent(s):
457c2a4
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,13 +61,13 @@ if st.button("Get Gender"):
|
|
| 61 |
'Boy' if logit > 0.5 else 'Girl' for logit in result
|
| 62 |
]
|
| 63 |
|
| 64 |
-
pred_df['Prediction Confidence
|
| 65 |
logit if logit > 0.5 else 1.0 - logit for logit in result
|
| 66 |
]
|
| 67 |
|
| 68 |
# Format the output
|
| 69 |
pred_df['Name'] = names
|
| 70 |
-
pred_df['Prediction Confidence
|
| 71 |
pred_df.drop_duplicates(inplace=True)
|
| 72 |
st.header('Predictions: ')
|
| 73 |
st.table(pred_df)
|
|
|
|
| 61 |
'Boy' if logit > 0.5 else 'Girl' for logit in result
|
| 62 |
]
|
| 63 |
|
| 64 |
+
pred_df['Prediction Confidence(%)'] = [
|
| 65 |
logit if logit > 0.5 else 1.0 - logit for logit in result
|
| 66 |
]
|
| 67 |
|
| 68 |
# Format the output
|
| 69 |
pred_df['Name'] = names
|
| 70 |
+
pred_df['Prediction Confidence(%)'] = pred_df['Prediction Confidence(%)'].round(2) * 100
|
| 71 |
pred_df.drop_duplicates(inplace=True)
|
| 72 |
st.header('Predictions: ')
|
| 73 |
st.table(pred_df)
|