romanbredehoft-zama commited on
Commit
31284a7
1 Parent(s): a241bb3

Rename Account_length feature to Account_age

Browse files
app.py CHANGED
@@ -90,7 +90,7 @@ with demo:
90
 
91
  with gr.Column():
92
  gr.Markdown("### Bank ")
93
- account_length = gr.Slider(**ACCOUNT_MIN_MAX, step=1, label="Account length", info="How long have this person had this account (in months) ?")
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, account_length],
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
- account_length = inputs[0]
294
 
295
- return _encrypt_send(client_id, account_length, "bank")
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,Account_length,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
 
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:9c0a655d225d0f31642c20c8f3e5537505b6b6904ad8af7636631024cf6e18b6
3
- size 76383
 
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:e5570f7dfda2d5ced4a6bd411d9d2eba67b8bcbd523efac803be66abd4368a99
3
- size 3321
 
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 = ["Account_length"]
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, "Account_length")
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")