qqubb commited on
Commit
4ad441d
·
verified ·
1 Parent(s): 92455a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -166,9 +166,9 @@ def concrete_predict_survival(input_dict):
166
  pred = concrete_clf.predict_proba(df)[0]
167
  return {"Perishes": float(pred[0]), "Survives": float(pred[1])}
168
 
169
- print("\nclear_test ", clear_predict_survival({'Pclass': [1], 'Sex': [0], 'Age': [25], 'Fare': [20.0], 'Embarked': [2], 'Company': [1]}))
170
 
171
- print("encrypted_test", concrete_predict_survival({'Pclass': [1], 'Sex': [0], 'Age': [25], 'Fare': [20.0], 'Embarked': [2], 'Company': [1]}),"\n")
172
 
173
 
174
  def key_gen_fn() -> Dict:
@@ -516,14 +516,14 @@ def decrypt_fn(user_id: str, user_inputs: np.ndarray) -> Dict:
516
  # Deserialize, decrypt and post-process the encrypted output
517
  output = client.deserialize_decrypt_dequantize(encrypted_output)
518
 
519
- # print("output =\n", output)
520
 
521
  # top3_diseases = np.argsort(output.flatten())[-3:][::-1]
522
  # top3_proba = output[0][top3_diseases]
523
 
524
  out = {"Perishes": float(output[0][0]), "Survives": float(output[0][1])}
525
 
526
- # print("output =\n", out)
527
 
528
  return {
529
  error_box7: gr.update(visible=False),
 
166
  pred = concrete_clf.predict_proba(df)[0]
167
  return {"Perishes": float(pred[0]), "Survives": float(pred[1])}
168
 
169
+ # print("\nclear_test ", clear_predict_survival({'Pclass': [1], 'Sex': [0], 'Age': [25], 'Fare': [20.0], 'Embarked': [2], 'Company': [1]}))
170
 
171
+ # print("encrypted_test", concrete_predict_survival({'Pclass': [1], 'Sex': [0], 'Age': [25], 'Fare': [20.0], 'Embarked': [2], 'Company': [1]}),"\n")
172
 
173
 
174
  def key_gen_fn() -> Dict:
 
516
  # Deserialize, decrypt and post-process the encrypted output
517
  output = client.deserialize_decrypt_dequantize(encrypted_output)
518
 
519
+ print("output =\n", output)
520
 
521
  # top3_diseases = np.argsort(output.flatten())[-3:][::-1]
522
  # top3_proba = output[0][top3_diseases]
523
 
524
  out = {"Perishes": float(output[0][0]), "Survives": float(output[0][1])}
525
 
526
+ print("output =\n", out)
527
 
528
  return {
529
  error_box7: gr.update(visible=False),