Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ import string
|
|
| 18 |
from msg_encX import *
|
| 19 |
|
| 20 |
|
| 21 |
-
def Encrypt_users_txt(Txt):
|
| 22 |
encMessage = Encrypt_msg(User_message=Txt,user_password='',path='')
|
| 23 |
return encMessage
|
| 24 |
|
|
@@ -43,14 +43,19 @@ with gr.Blocks() as demo:
|
|
| 43 |
gr.Markdown("<center><b>'You can encrypt/decrypt so many messages everyday.'</b></center>")
|
| 44 |
#gr.Markdown("<center>Transcription takes 5-10 seconds per minute of the video (bad audio/hard accents slow it down a bit). #patience<br />If you have time while waiting, drop a ♥️ and check out my <a href=https://www.artificial-intelligence.blog target=_blank>AI blog</a> (opens in new tab).</center>")
|
| 45 |
input_text = gr.Textbox(placeholder='Message', label='Message')
|
|
|
|
| 46 |
#User_password = gr.Textbox(placeholder='Password', label='User password')
|
| 47 |
result_button_encrypt = gr.Button('Encrypt/تشفير')
|
| 48 |
result_button_decrypt = gr.Button('Decrypt/فك تشفير')
|
| 49 |
#vc_f0method = gr.Radio(label="Encrypt or Decrypt", choices=["Encrypt", "Decrypt"],value="Encrypt",interactive=True,)
|
| 50 |
output_text = gr.Textbox(placeholder='', label='Output')
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
result_button_encrypt.click(Encrypt_users_txt, inputs =
|
| 53 |
-
result_button_decrypt.click(Decrypt_users_txt, inputs =
|
| 54 |
|
| 55 |
|
| 56 |
demo.queue(default_enabled = True).launch(debug = True)
|
|
|
|
| 18 |
from msg_encX import *
|
| 19 |
|
| 20 |
|
| 21 |
+
def Encrypt_users_txt(Txt,y):
|
| 22 |
encMessage = Encrypt_msg(User_message=Txt,user_password='',path='')
|
| 23 |
return encMessage
|
| 24 |
|
|
|
|
| 43 |
gr.Markdown("<center><b>'You can encrypt/decrypt so many messages everyday.'</b></center>")
|
| 44 |
#gr.Markdown("<center>Transcription takes 5-10 seconds per minute of the video (bad audio/hard accents slow it down a bit). #patience<br />If you have time while waiting, drop a ♥️ and check out my <a href=https://www.artificial-intelligence.blog target=_blank>AI blog</a> (opens in new tab).</center>")
|
| 45 |
input_text = gr.Textbox(placeholder='Message', label='Message')
|
| 46 |
+
Passwrd = gr.Textbox(placeholder='Password', label='Password')
|
| 47 |
#User_password = gr.Textbox(placeholder='Password', label='User password')
|
| 48 |
result_button_encrypt = gr.Button('Encrypt/تشفير')
|
| 49 |
result_button_decrypt = gr.Button('Decrypt/فك تشفير')
|
| 50 |
#vc_f0method = gr.Radio(label="Encrypt or Decrypt", choices=["Encrypt", "Decrypt"],value="Encrypt",interactive=True,)
|
| 51 |
output_text = gr.Textbox(placeholder='', label='Output')
|
| 52 |
+
|
| 53 |
+
inputs = [
|
| 54 |
+
gr.Textboxgr.Textbox(placeholder='Message', label='Message'),
|
| 55 |
+
gr.Textbox(placeholder='Password', label='Password')]
|
| 56 |
|
| 57 |
+
result_button_encrypt.click(Encrypt_users_txt, inputs = inputs, outputs = output_text)
|
| 58 |
+
result_button_decrypt.click(Decrypt_users_txt, inputs = inputs, outputs = output_text)
|
| 59 |
|
| 60 |
|
| 61 |
demo.queue(default_enabled = True).launch(debug = True)
|