Omnibus commited on
Commit
ae87355
·
1 Parent(s): 94a5bbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -25
app.py CHANGED
@@ -172,31 +172,33 @@ def decode_qr(im,passw):
172
 
173
 
174
  with gr.Blocks() as app:
175
- with gr.Tab("Encrypt"):
176
- pass_in=gr.Textbox(label="Set Password")
177
- with gr.Row():
178
- with gr.Column():
179
- send=gr.Textbox(label="Sender")
180
- rec=gr.Textbox(label="Recipient")
181
- am=gr.Textbox(label="Amount")
182
- gr.Column()
183
-
184
-
185
- en_btn = gr.Button("Encrypt")
186
- enc_out = gr.Textbox(label="Encrypted Bytes")
187
- enc_qr_out = gr.Image(label = "Encrypted QR")
188
-
189
- with gr.Tab("Decrypt"):
190
- pass_out = gr.Textbox(label="Enter Password")
191
-
192
- dec_qr_im = gr.Image(type="filepath")
193
- with gr.Row():
194
- dec_qr_txt = gr.Textbox(label="Decrypted Message")
195
- d_json = gr.JSON(label="Decrypted JSON")
196
-
197
- dec_qr_im_out =gr.Image(label="Decrytped Image")
198
- dec_qr_btn = gr.Button("Decrypt")
199
-
 
 
200
  dec_qr_btn.click(decode_qr,[dec_qr_im,pass_out],[dec_qr_im_out,dec_qr_txt,d_json])
201
  en_btn.click(encrypt,[pass_in,send,rec,am],[enc_out,enc_qr_out,dec_qr_im])
202
  app.launch()
 
172
 
173
 
174
  with gr.Blocks() as app:
175
+ with gr.Row():
176
+ gr.Column()
177
+ with gr.Column():
178
+ with gr.Tab("Encrypt"):
179
+ pass_in=gr.Textbox(label="Set Password")
180
+ with gr.Row():
181
+ with gr.Column():
182
+ send=gr.Textbox(label="Sender")
183
+ rec=gr.Textbox(label="Recipient")
184
+ am=gr.Textbox(label="Amount")
185
+
186
+
187
+ en_btn = gr.Button("Encrypt")
188
+ enc_out = gr.Textbox(label="Encrypted Bytes")
189
+ enc_qr_out = gr.Image(label = "Encrypted QR")
190
+
191
+ with gr.Tab("Decrypt"):
192
+ pass_out = gr.Textbox(label="Enter Password")
193
+
194
+ dec_qr_im = gr.Image(type="filepath")
195
+ with gr.Row():
196
+ dec_qr_txt = gr.Textbox(label="Decrypted Message")
197
+ d_json = gr.JSON(label="Decrypted JSON")
198
+
199
+ dec_qr_im_out =gr.Image(label="Decrytped Image")
200
+ dec_qr_btn = gr.Button("Decrypt")
201
+ gr.Column()
202
  dec_qr_btn.click(decode_qr,[dec_qr_im,pass_out],[dec_qr_im_out,dec_qr_txt,d_json])
203
  en_btn.click(encrypt,[pass_in,send,rec,am],[enc_out,enc_qr_out,dec_qr_im])
204
  app.launch()