Omnibus commited on
Commit
40d5fc0
·
1 Parent(s): 025ae20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def encrypt(passw=None,mes=None,img=None,doc=None):
47
  enc_mes = f'{im_bytes}+bbb+'
48
 
49
  if doc != None:
50
- doc = Path(doc)
51
  with open(doc, "rb") as file:
52
  # read all file data
53
  file_data = file.read()
@@ -111,7 +111,7 @@ with gr.Blocks() as app:
111
  mes = gr.Textbox(label = "Message")
112
  with gr.Row():
113
  im = gr.Image(type="filepath")
114
- doc=gr.File()
115
  en_btn = gr.Button("Encrypt")
116
  enc_out = gr.Textbox(label="Encrypted Bytes")
117
  with gr.Tab("Decrypt"):
 
47
  enc_mes = f'{im_bytes}+bbb+'
48
 
49
  if doc != None:
50
+ #doc = Path(doc)
51
  with open(doc, "rb") as file:
52
  # read all file data
53
  file_data = file.read()
 
111
  mes = gr.Textbox(label = "Message")
112
  with gr.Row():
113
  im = gr.Image(type="filepath")
114
+ doc=gr.File(type="binary")
115
  en_btn = gr.Button("Encrypt")
116
  enc_out = gr.Textbox(label="Encrypted Bytes")
117
  with gr.Tab("Decrypt"):