Spaces:
Sleeping
Sleeping
import gradio as gr | |
def hide_message(reg,sec): | |
out = reg + " " + ''.join(chr(0xE0000 + ord(ch)) for ch in sec) | |
#def reverse_e0000_encoding(input_str): | |
print(''.join(chr(ord(ch) - 0xE0000) if 0xE0000 <= ord(ch) <= 0x10FFFF else chr(ord(ch)) for ch in out)) | |
print (len(out)) | |
print (out) | |
print([out]) | |
return out | |
with gr.Blocks() as app: | |
with gr.Row(): | |
with gr.Column(): | |
reg = gr.Textbox(label="Visible String") | |
sec = gr.Textbox(label="Secret Message") | |
btn=gr.Button() | |
outp=gr.Textbox(label="Output Message") | |
btn.click(hide_message,[reg,sec],outp) | |
app.launch() |