Spaces:
Sleeping
Sleeping
Update slapp.py
Browse files
slapp.py
CHANGED
|
@@ -21,44 +21,66 @@ st.markdown("Welcome to the Fraud Detection API! Please enter the transaction de
|
|
| 21 |
# Tabs for input sections
|
| 22 |
tab1, tab2, tab3 = st.tabs(["Basic Info", "Features (V1 - V14)", "Features (V15 - V28)"])
|
| 23 |
|
|
|
|
| 24 |
with tab1:
|
| 25 |
st.header("Basic Information")
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
|
|
|
|
| 29 |
with tab2:
|
| 30 |
st.header("Features (V1 - V14)")
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
|
|
|
| 46 |
with tab3:
|
| 47 |
st.header("Features (V15 - V28)")
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
# Button to make predictions
|
| 64 |
if st.button("Predict"):
|
|
|
|
| 21 |
# Tabs for input sections
|
| 22 |
tab1, tab2, tab3 = st.tabs(["Basic Info", "Features (V1 - V14)", "Features (V15 - V28)"])
|
| 23 |
|
| 24 |
+
# Horizontal layout for Basic Info
|
| 25 |
with tab1:
|
| 26 |
st.header("Basic Information")
|
| 27 |
+
col1, col2 = st.columns(2)
|
| 28 |
+
with col1:
|
| 29 |
+
time = st.number_input("Time", min_value=0.0, step=0.1)
|
| 30 |
+
with col2:
|
| 31 |
+
amount = st.number_input("Amount", min_value=0.0, step=0.1)
|
| 32 |
|
| 33 |
+
# Horizontal layout for Features V1 - V14
|
| 34 |
with tab2:
|
| 35 |
st.header("Features (V1 - V14)")
|
| 36 |
+
cols = st.columns(7)
|
| 37 |
+
with cols[0]:
|
| 38 |
+
v1 = st.number_input("V1", step=0.01)
|
| 39 |
+
v2 = st.number_input("V2", step=0.01)
|
| 40 |
+
with cols[1]:
|
| 41 |
+
v3 = st.number_input("V3", step=0.01)
|
| 42 |
+
v4 = st.number_input("V4", step=0.01)
|
| 43 |
+
with cols[2]:
|
| 44 |
+
v5 = st.number_input("V5", step=0.01)
|
| 45 |
+
v6 = st.number_input("V6", step=0.01)
|
| 46 |
+
with cols[3]:
|
| 47 |
+
v7 = st.number_input("V7", step=0.01)
|
| 48 |
+
v8 = st.number_input("V8", step=0.01)
|
| 49 |
+
with cols[4]:
|
| 50 |
+
v9 = st.number_input("V9", step=0.01)
|
| 51 |
+
v10 = st.number_input("V10", step=0.01)
|
| 52 |
+
with cols[5]:
|
| 53 |
+
v11 = st.number_input("V11", step=0.01)
|
| 54 |
+
v12 = st.number_input("V12", step=0.01)
|
| 55 |
+
with cols[6]:
|
| 56 |
+
v13 = st.number_input("V13", step=0.01)
|
| 57 |
+
v14 = st.number_input("V14", step=0.01)
|
| 58 |
|
| 59 |
+
# Horizontal layout for Features V15 - V28
|
| 60 |
with tab3:
|
| 61 |
st.header("Features (V15 - V28)")
|
| 62 |
+
cols = st.columns(7)
|
| 63 |
+
with cols[0]:
|
| 64 |
+
v15 = st.number_input("V15", step=0.01)
|
| 65 |
+
v16 = st.number_input("V16", step=0.01)
|
| 66 |
+
with cols[1]:
|
| 67 |
+
v17 = st.number_input("V17", step=0.01)
|
| 68 |
+
v18 = st.number_input("V18", step=0.01)
|
| 69 |
+
with cols[2]:
|
| 70 |
+
v19 = st.number_input("V19", step=0.01)
|
| 71 |
+
v20 = st.number_input("V20", step=0.01)
|
| 72 |
+
with cols[3]:
|
| 73 |
+
v21 = st.number_input("V21", step=0.01)
|
| 74 |
+
v22 = st.number_input("V22", step=0.01)
|
| 75 |
+
with cols[4]:
|
| 76 |
+
v23 = st.number_input("V23", step=0.01)
|
| 77 |
+
v24 = st.number_input("V24", step=0.01)
|
| 78 |
+
with cols[5]:
|
| 79 |
+
v25 = st.number_input("V25", step=0.01)
|
| 80 |
+
v26 = st.number_input("V26", step=0.01)
|
| 81 |
+
with cols[6]:
|
| 82 |
+
v27 = st.number_input("V27", step=0.01)
|
| 83 |
+
v28 = st.number_input("V28", step=0.01)
|
| 84 |
|
| 85 |
# Button to make predictions
|
| 86 |
if st.button("Predict"):
|