qqubb commited on
Commit
88a82cf
1 Parent(s): 5b2624e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -205,7 +205,7 @@ def key_gen_fn() -> Dict:
205
  key_box: gr.update(visible=True, value=serialized_evaluation_keys_shorten_hex),
206
  user_id_box: gr.update(visible=True, value=user_id),
207
  key_len_box: gr.update(
208
- visible=True, value=f"{len(serialized_evaluation_keys) / (10**6):.2f} MB"
209
  ),
210
  }
211
 
@@ -543,7 +543,7 @@ with gr.Blocks() as demo:
543
  gen_key_btn = gr.Button("Generate the evaluation key")
544
  error_box2 = gr.Textbox(label="Error ❌", visible=False)
545
  user_id_box = gr.Textbox(label="User ID:", visible=True)
546
- # key_len_box = gr.Textbox(label="Evaluation Key Size:", visible=False)
547
  key_box = gr.Textbox(label="Evaluation key (truncated):", max_lines=3, visible=False)
548
 
549
  gen_key_btn.click(
@@ -552,7 +552,7 @@ with gr.Blocks() as demo:
552
  outputs=[
553
  key_box,
554
  user_id_box,
555
- # key_len_box,
556
  error_box2,
557
  ],
558
  )
 
205
  key_box: gr.update(visible=True, value=serialized_evaluation_keys_shorten_hex),
206
  user_id_box: gr.update(visible=True, value=user_id),
207
  key_len_box: gr.update(
208
+ visible=False, value=f"{len(serialized_evaluation_keys) / (10**6):.2f} MB"
209
  ),
210
  }
211
 
 
543
  gen_key_btn = gr.Button("Generate the evaluation key")
544
  error_box2 = gr.Textbox(label="Error ❌", visible=False)
545
  user_id_box = gr.Textbox(label="User ID:", visible=True)
546
+ key_len_box = gr.Textbox(label="Evaluation Key Size:", visible=False)
547
  key_box = gr.Textbox(label="Evaluation key (truncated):", max_lines=3, visible=False)
548
 
549
  gen_key_btn.click(
 
552
  outputs=[
553
  key_box,
554
  user_id_box,
555
+ key_len_box,
556
  error_box2,
557
  ],
558
  )