mariotawfik commited on
Commit
415aa2c
·
1 Parent(s): 391642d
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -346,7 +346,7 @@ if __name__ == "__main__":
346
  scan_result = gr.Textbox(label="Scan Result:")
347
 
348
  # Button for key generation
349
- b_gen_key.click(keygen, inputs=[eval_key], outputs=[])
350
 
351
  # Button to extract vector
352
  b_extract.click(
@@ -357,16 +357,16 @@ if __name__ == "__main__":
357
 
358
  # Button to encrypt file
359
  b_encrypt_file.click(
360
- encrypt_encoded_quantize,
361
- inputs=[file_input, eval_key],
362
  outputs=[encrypted_file],
363
  )
364
 
365
  # Button to run FHE-based malware scan
366
- b_run_fhe_scan.click(run_fhe, inputs=[eval_key[1]], outputs=[encrypted_scan_result])
367
 
368
  # Button to decrypt the scan result
369
- b_decrypt_result.click(decrypt_prediction, inputs=[eval_key[1]], outputs=[scan_result])
370
 
371
  gr.Markdown(
372
  "ClairVault is built using advanced Fully Homomorphic Encryption techniques to ensure your data remains private and secure throughout the entire malware scanning process."
 
346
  scan_result = gr.Textbox(label="Scan Result:")
347
 
348
  # Button for key generation
349
+ b_gen_key.click(keygen(eval_key), inputs=[], outputs=[])
350
 
351
  # Button to extract vector
352
  b_extract.click(
 
357
 
358
  # Button to encrypt file
359
  b_encrypt_file.click(
360
+ encrypt_encoded_quantize(file_input, eval_key),
361
+ inputs=[],
362
  outputs=[encrypted_file],
363
  )
364
 
365
  # Button to run FHE-based malware scan
366
+ b_run_fhe_scan.click(run_fhe(eval_key[1]), inputs=[], outputs=[encrypted_scan_result])
367
 
368
  # Button to decrypt the scan result
369
+ b_decrypt_result.click(decrypt_prediction(eval_key[1]), inputs=[], outputs=[scan_result])
370
 
371
  gr.Markdown(
372
  "ClairVault is built using advanced Fully Homomorphic Encryption techniques to ensure your data remains private and secure throughout the entire malware scanning process."