Commit ·
9bbeadf
1
Parent(s): 29d0dc3
chore: update UI with step numbering
Browse files215 unmodified lines21621721821922021922122222322412 unmodified lines23723823923823924024124224324424524524624724824925025125225325417 unmodified lines2722732742752762772786 unmodified lines285286287288289290291215 unmodified lines""" )
gr.Markdown("# Step 1: Generate the keys")
b_gen_key_and_install = gr.Button("Generate the key and send public part to server") b_gen_key_and_install = gr.Button("Generate the keys and send public part to server")
evaluation_key = gr.Textbox( label="Evaluation key (truncated):",12 unmodified lines label="Size of the evalution key (in bytes):", value=0, interactive=False )
# FIXME: add a picture from marketing with client->server interactions
gr.Markdown("# Step 2: Provide a message") gr.Markdown("## Client side") gr.Markdown( "Enter a sensitive text message you received and would like to do sentiment analysis on (ideas: the last text message of your boss.... or lover)." ) text = gr.Textbox(label="Enter a message:", value="I really like your work recently") size_text = gr.Number(label="Size of the text (in bytes):", value=0, interactive=False) b_encode_quantize_text = gr.Button( "Encode, quantize and encrypt the text with transformer vectorizer, and send to server" ) size_text = gr.Number(label="Size of the text (in bytes):", value="0", interactive=False)
gr.Markdown("# Step 3: Encode the message with the private key") with gr.Row(): encoding = gr.Textbox( label="Transformer representation:",17 unmodified lines interactive=False, )
gr.Markdown("# Step 4: Run the FHE evaluation") gr.Markdown("## Server side") gr.Markdown( "The encrypted value is received by the server. Thanks to the evaluation key and to FHE, the server can compute the (encrypted) prediction directly over encrypted values. Once the computation is finished, the server returns the encrypted prediction to the client."6 unmodified lines interactive=False, )
gr.Markdown("# Step 5: Decrypt the sentiment") gr.Markdown("## Client side") gr.Markdown( "The encrypted sentiment is sent back to client, who can finally decrypt it with its private key. Only the client is aware of the original tweet and the prediction."app.py+8-4