Spaces:
Runtime error
Runtime error
add show_image
Browse files
app.py
CHANGED
|
@@ -8,13 +8,11 @@ public_key, private_key = paillier.generate_paillier_keypair(n_length=1024)
|
|
| 8 |
|
| 9 |
|
| 10 |
def show_image():
|
| 11 |
-
|
| 12 |
-
# Convert To PIL Image
|
| 13 |
-
|
| 14 |
html = (
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
)
|
| 19 |
return html
|
| 20 |
|
|
@@ -82,9 +80,11 @@ iface = gr.Interface(
|
|
| 82 |
],
|
| 83 |
title="Paillier Encryption Demonstration",
|
| 84 |
description="This app demonstrates Paillier encryption. Enter data (e.g., smoker, non-smoker) in the textbox, and the app will perform encryption and homomorphic addition.",
|
| 85 |
-
|
| 86 |
|
| 87 |
)
|
| 88 |
-
|
| 89 |
# Launch the Gradio app
|
| 90 |
-
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
def show_image():
|
| 11 |
+
# Convert To PIL Image (you can implement your desired image display logic here)
|
|
|
|
|
|
|
| 12 |
html = (
|
| 13 |
+
"<div>"
|
| 14 |
+
"<img src='https://dnasafe.io/redesign/animation.gif' alt='image One'>"
|
| 15 |
+
+ "</div>"
|
| 16 |
)
|
| 17 |
return html
|
| 18 |
|
|
|
|
| 80 |
],
|
| 81 |
title="Paillier Encryption Demonstration",
|
| 82 |
description="This app demonstrates Paillier encryption. Enter data (e.g., smoker, non-smoker) in the textbox, and the app will perform encryption and homomorphic addition.",
|
| 83 |
+
|
| 84 |
|
| 85 |
)
|
| 86 |
+
# Add show_image to the layout (optional)
|
| 87 |
# Launch the Gradio app
|
| 88 |
+
layout = Column([show_image(), iface])
|
| 89 |
+
iface.launch(layout=layout) # Use layout argument
|
| 90 |
+
|