romanbredehoft-zama
commited on
Commit
•
31284a7
1
Parent(s):
a241bb3
Rename Account_length feature to Account_age
Browse files- app.py +2 -2
- backend.py +2 -2
- data/data.csv +1 -1
- deployment_files/client.zip +2 -2
- deployment_files/server.zip +2 -2
- settings.py +2 -2
app.py
CHANGED
@@ -90,7 +90,7 @@ with demo:
|
|
90 |
|
91 |
with gr.Column():
|
92 |
gr.Markdown("### Bank ")
|
93 |
-
|
94 |
|
95 |
with gr.Column():
|
96 |
gr.Markdown("### Third party ")
|
@@ -193,7 +193,7 @@ with demo:
|
|
193 |
# side to the server
|
194 |
encrypt_button_bank.click(
|
195 |
pre_process_encrypt_send_bank,
|
196 |
-
inputs=[client_id,
|
197 |
outputs=[encrypted_input_bank],
|
198 |
)
|
199 |
|
|
|
90 |
|
91 |
with gr.Column():
|
92 |
gr.Markdown("### Bank ")
|
93 |
+
account_age = gr.Slider(**ACCOUNT_MIN_MAX, step=1, label="Account age (months)", info="How long have this person had this bank account (in months) ?")
|
94 |
|
95 |
with gr.Column():
|
96 |
gr.Markdown("### Third party ")
|
|
|
193 |
# side to the server
|
194 |
encrypt_button_bank.click(
|
195 |
pre_process_encrypt_send_bank,
|
196 |
+
inputs=[client_id, account_age],
|
197 |
outputs=[encrypted_input_bank],
|
198 |
)
|
199 |
|
backend.py
CHANGED
@@ -290,9 +290,9 @@ def pre_process_encrypt_send_bank(client_id, *inputs):
|
|
290 |
(int, bytes): Integer ID representing the current client and a byte short representation of
|
291 |
the encrypted input to send.
|
292 |
"""
|
293 |
-
|
294 |
|
295 |
-
return _encrypt_send(client_id,
|
296 |
|
297 |
|
298 |
def pre_process_encrypt_send_third_party(client_id, *inputs):
|
|
|
290 |
(int, bytes): Integer ID representing the current client and a byte short representation of
|
291 |
the encrypted input to send.
|
292 |
"""
|
293 |
+
account_age = inputs[0]
|
294 |
|
295 |
+
return _encrypt_send(client_id, account_age, "bank")
|
296 |
|
297 |
|
298 |
def pre_process_encrypt_send_third_party(client_id, *inputs):
|
data/data.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Own_car,Own_property,Work_phone,Phone,Email,Salaried,Num_children,Household_size,
|
2 |
1,1,1,0,0,1,0,2,15,59850.00000000001,32.86857361889703,12.4355736257418,Working,Higher education,Civil marriage,Rented apartment,Other,1
|
3 |
1,1,0,0,0,1,0,2,29,15750.000000000002,58.79381506807121,3.104786545924968,Working,Secondary / secondary special,Married,House / apartment,Security staff,0
|
4 |
0,1,0,1,1,1,0,1,4,37800.0,52.32140290355038,8.353354278321937,Commercial associate,Secondary / secondary special,Single / not married,House / apartment,Sales staff,0
|
|
|
1 |
+
Own_car,Own_property,Work_phone,Phone,Email,Salaried,Num_children,Household_size,Account_age,Total_income,Age,Years_employed,Income_type,Education_type,Family_status,Housing_type,Occupation_type,Target
|
2 |
1,1,1,0,0,1,0,2,15,59850.00000000001,32.86857361889703,12.4355736257418,Working,Higher education,Civil marriage,Rented apartment,Other,1
|
3 |
1,1,0,0,0,1,0,2,29,15750.000000000002,58.79381506807121,3.104786545924968,Working,Secondary / secondary special,Married,House / apartment,Security staff,0
|
4 |
0,1,0,1,1,1,0,1,4,37800.0,52.32140290355038,8.353354278321937,Commercial associate,Secondary / secondary special,Single / not married,House / apartment,Sales staff,0
|
deployment_files/client.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b698501c432ade8d406a3d83fcff9a86ed59a4c693116d14b72815602b04b1d9
|
3 |
+
size 75886
|
deployment_files/server.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:73e247b96ac6325fde795f2f6e6c8cd43946b5e5979421845283871bb8e0475e
|
3 |
+
size 3356
|
settings.py
CHANGED
@@ -50,7 +50,7 @@ USER_COLUMNS = [
|
|
50 |
'Total_income', 'Age', 'Income_type', 'Education_type', 'Family_status', 'Housing_type',
|
51 |
'Occupation_type',
|
52 |
]
|
53 |
-
BANK_COLUMNS = ["
|
54 |
THIRD_PARTY_COLUMNS = ["Years_employed", "Salaried"]
|
55 |
|
56 |
_data = pandas.read_csv(DATA_PATH, encoding="utf-8")
|
@@ -63,7 +63,7 @@ def get_min_max(data, column):
|
|
63 |
}
|
64 |
|
65 |
# App data min and max values
|
66 |
-
ACCOUNT_MIN_MAX = get_min_max(_data, "
|
67 |
CHILDREN_MIN_MAX = get_min_max(_data, "Num_children")
|
68 |
INCOME_MIN_MAX = get_min_max(_data, "Total_income")
|
69 |
AGE_MIN_MAX = get_min_max(_data, "Age")
|
|
|
50 |
'Total_income', 'Age', 'Income_type', 'Education_type', 'Family_status', 'Housing_type',
|
51 |
'Occupation_type',
|
52 |
]
|
53 |
+
BANK_COLUMNS = ["Account_age"]
|
54 |
THIRD_PARTY_COLUMNS = ["Years_employed", "Salaried"]
|
55 |
|
56 |
_data = pandas.read_csv(DATA_PATH, encoding="utf-8")
|
|
|
63 |
}
|
64 |
|
65 |
# App data min and max values
|
66 |
+
ACCOUNT_MIN_MAX = get_min_max(_data, "Account_age")
|
67 |
CHILDREN_MIN_MAX = get_min_max(_data, "Num_children")
|
68 |
INCOME_MIN_MAX = get_min_max(_data, "Total_income")
|
69 |
AGE_MIN_MAX = get_min_max(_data, "Age")
|