Spaces:
Sleeping
Sleeping
Ahmad Hammoudeh
commited on
Commit
·
40906f8
1
Parent(s):
739c97e
Update app.py
Browse files
app.py
CHANGED
|
@@ -136,10 +136,14 @@ def Decrypt_msg(encMessage,user_password,path):
|
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
-
def
|
| 140 |
encMessage = Encrypt_msg(User_message=Txt,user_password='',path='')
|
| 141 |
-
return
|
| 142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
#result_button_encrypt = gr.Button('Encrypt')
|
| 144 |
#result_button_encrypt.click(greet, inputs = "text", outputs = "text")
|
| 145 |
|
|
@@ -154,10 +158,11 @@ with gr.Blocks() as demo:
|
|
| 154 |
#gr.Markdown("<center>Enter the link of any YouTube video to generate a text transcript of the video.</center>")
|
| 155 |
#gr.Markdown("<center><b>'Whisper is a neural net that approaches human level robustness and accuracy on English speech recognition.'</b></center>")
|
| 156 |
#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>")
|
| 157 |
-
|
| 158 |
result_button_encrypt = gr.Button('Encrypte')
|
|
|
|
| 159 |
output_text_encrypt = gr.Textbox(placeholder='Encrypted message', label='Encrypt')
|
| 160 |
-
result_button_encrypt.click(
|
| 161 |
|
| 162 |
demo.queue(default_enabled = True).launch(debug = True)
|
| 163 |
|
|
|
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
+
def Encrypt_users_txt(Txt):
|
| 140 |
encMessage = Encrypt_msg(User_message=Txt,user_password='',path='')
|
| 141 |
+
return encMessage
|
| 142 |
|
| 143 |
+
def Decrypt_users_txt(Txt):
|
| 144 |
+
encMessage = Decrypt_msg(encMessage=Txt,user_password='',path='')
|
| 145 |
+
return encMessage
|
| 146 |
+
|
| 147 |
#result_button_encrypt = gr.Button('Encrypt')
|
| 148 |
#result_button_encrypt.click(greet, inputs = "text", outputs = "text")
|
| 149 |
|
|
|
|
| 158 |
#gr.Markdown("<center>Enter the link of any YouTube video to generate a text transcript of the video.</center>")
|
| 159 |
#gr.Markdown("<center><b>'Whisper is a neural net that approaches human level robustness and accuracy on English speech recognition.'</b></center>")
|
| 160 |
#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>")
|
| 161 |
+
input_text = gr.Textbox(placeholder='Message', label='User message')
|
| 162 |
result_button_encrypt = gr.Button('Encrypte')
|
| 163 |
+
result_button_decrypt = gr.Button('Decrypte')
|
| 164 |
output_text_encrypt = gr.Textbox(placeholder='Encrypted message', label='Encrypt')
|
| 165 |
+
result_button_encrypt.click(Encrypt_users_txt, inputs = input_text, outputs = output_text_encrypt)
|
| 166 |
|
| 167 |
demo.queue(default_enabled = True).launch(debug = True)
|
| 168 |
|