80cols commited on
Commit
77771e2
·
verified ·
1 Parent(s): 8b57c55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -16
app.py CHANGED
@@ -807,6 +807,30 @@ with demo:
807
 
808
  gr.Markdown("<hr />")
809
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
 
811
 
812
 
@@ -1247,22 +1271,6 @@ demo.launch(share=False)
1247
 
1248
  # gr.Markdown("<hr />")
1249
 
1250
-
1251
-
1252
-
1253
-
1254
-
1255
-
1256
-
1257
-
1258
-
1259
-
1260
-
1261
-
1262
-
1263
-
1264
-
1265
-
1266
  # ########################## Model Prediction ##########################
1267
 
1268
  # gr.Markdown("## Step 3: Run the FHE evaluation.")
@@ -1286,6 +1294,27 @@ demo.launch(share=False)
1286
 
1287
  # gr.Markdown("<hr />")
1288
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1289
  # ########################## Decrypt Prediction ##########################
1290
 
1291
  # gr.Markdown("## Step 4: Receive the encrypted output from the server and decrypt.")
 
807
 
808
  gr.Markdown("<hr />")
809
 
810
+ ########################## Model Prediction ##########################
811
+
812
+ gr.Markdown("## Step 3: Run the FHE evaluation.")
813
+ gr.Markdown("<span style='color:grey'>Server Side</span>")
814
+ gr.Markdown(
815
+ """
816
+ It's high time to launch our prediction, by pressing the button you will launch the
817
+ fraud analysis that our fictitious bank offers you.
818
+ This server employs a [Random Forest (by Concrete-ML)](https://github.com/zama-ai/concrete-ml/blob/release/1.8.x/docs/references/api/concrete.ml.sklearn.rf.md#class-randomforestclassifier)
819
+ classifier model that has been trained on a synthetic data-set.
820
+ """
821
+ )
822
+
823
+ execute_fhe_button = gr.Button("Run the FHE evaluation.")
824
+ fhe_execution_time = gr.Textbox(
825
+ label="Total FHE execution time (in seconds):", max_lines=1, interactive=False
826
+ )
827
+
828
+ # Button to send the encodings to the server using post method
829
+ execute_fhe_button.click(predict, outputs=[fhe_execution_time, execute_fhe_button])
830
+
831
+ gr.Markdown("<hr />")
832
+
833
+
834
 
835
 
836
 
 
1271
 
1272
  # gr.Markdown("<hr />")
1273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1274
  # ########################## Model Prediction ##########################
1275
 
1276
  # gr.Markdown("## Step 3: Run the FHE evaluation.")
 
1294
 
1295
  # gr.Markdown("<hr />")
1296
 
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
  # ########################## Decrypt Prediction ##########################
1319
 
1320
  # gr.Markdown("## Step 4: Receive the encrypted output from the server and decrypt.")