File size: 638 Bytes
7e44235
a93dbdd
623810f
06bc063
 
a714294
 
0923285
623810f
4be2310
7e44235
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()