Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -172,31 +172,33 @@ def decode_qr(im,passw):
|
|
172 |
|
173 |
|
174 |
with gr.Blocks() as app:
|
175 |
-
with gr.
|
176 |
-
|
177 |
-
with gr.
|
178 |
-
with gr.
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
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()
|