Spaces:
Runtime error
Runtime error
Commit
·
415aa2c
1
Parent(s):
391642d
update
Browse files
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=[
|
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=[
|
362 |
outputs=[encrypted_file],
|
363 |
)
|
364 |
|
365 |
# Button to run FHE-based malware scan
|
366 |
-
b_run_fhe_scan.click(run_fhe, inputs=[
|
367 |
|
368 |
# Button to decrypt the scan result
|
369 |
-
b_decrypt_result.click(decrypt_prediction, inputs=[
|
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."
|