Spaces:
Paused
Paused
Gradio 6.29 port
Browse files- README.md +1 -1
- app.py +4 -4
- requirements.txt +4 -2
- stegan.py +1 -1
- stegan2.py +1 -1
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: ⚡
|
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
|
|
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.29.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
app.py
CHANGED
|
@@ -118,13 +118,13 @@ with gr.Blocks() as app:
|
|
| 118 |
with gr.Column():
|
| 119 |
with gr.Row():
|
| 120 |
with gr.Tab("Gen Wal"):
|
| 121 |
-
gen_wal_btn=gr.Button()
|
| 122 |
seed = gr.Textbox(label='Seed Phrase')
|
| 123 |
-
img1=gr.
|
| 124 |
out1 = gr.Textbox(label='Private Key',max_lines=4)
|
| 125 |
-
img2=gr.
|
| 126 |
out2 = gr.Textbox(label='Public Key',max_lines=4)
|
| 127 |
-
img3=gr.
|
| 128 |
out3 = gr.Textbox(label='Address')
|
| 129 |
with gr.Tab("Encrypt"):
|
| 130 |
rsa_to_enc = gr.Textbox(label="txt to encrypt")
|
|
|
|
| 118 |
with gr.Column():
|
| 119 |
with gr.Row():
|
| 120 |
with gr.Tab("Gen Wal"):
|
| 121 |
+
gen_wal_btn=gr.Button("Generate Wallet")
|
| 122 |
seed = gr.Textbox(label='Seed Phrase')
|
| 123 |
+
img1=gr.Image(type='pil', label='Private Key')
|
| 124 |
out1 = gr.Textbox(label='Private Key',max_lines=4)
|
| 125 |
+
img2=gr.Image(type='pil', label='Public Key')
|
| 126 |
out2 = gr.Textbox(label='Public Key',max_lines=4)
|
| 127 |
+
img3=gr.Image(type='pil', label='Address')
|
| 128 |
out3 = gr.Textbox(label='Address')
|
| 129 |
with gr.Tab("Encrypt"):
|
| 130 |
rsa_to_enc = gr.Textbox(label="txt to encrypt")
|
requirements.txt
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
-
opencv-python
|
| 2 |
qrcode
|
| 3 |
pycryptodome
|
| 4 |
-
base58
|
|
|
|
|
|
|
|
|
| 1 |
+
opencv-python-headless
|
| 2 |
qrcode
|
| 3 |
pycryptodome
|
| 4 |
+
base58
|
| 5 |
+
pillow
|
| 6 |
+
numpy
|
stegan.py
CHANGED
|
@@ -57,7 +57,7 @@ def encode(image_name, secret_data,txt=None):
|
|
| 57 |
break
|
| 58 |
secret_data = secret_data1
|
| 59 |
if len(secret_data) > n_bytes:
|
| 60 |
-
|
| 61 |
secret_data += "====="
|
| 62 |
data_index = 0
|
| 63 |
binary_secret_data = to_bin(secret_data)
|
|
|
|
| 57 |
break
|
| 58 |
secret_data = secret_data1
|
| 59 |
if len(secret_data) > n_bytes:
|
| 60 |
+
raise ValueError("Input image is too large")
|
| 61 |
secret_data += "====="
|
| 62 |
data_index = 0
|
| 63 |
binary_secret_data = to_bin(secret_data)
|
stegan2.py
CHANGED
|
@@ -57,7 +57,7 @@ def encode(image_name, secret_data,txt=None):
|
|
| 57 |
break
|
| 58 |
secret_data = secret_data1
|
| 59 |
if len(secret_data) > n_bytes:
|
| 60 |
-
|
| 61 |
secret_data += "====="
|
| 62 |
data_index = 0
|
| 63 |
binary_secret_data = to_bin(secret_data)
|
|
|
|
| 57 |
break
|
| 58 |
secret_data = secret_data1
|
| 59 |
if len(secret_data) > n_bytes:
|
| 60 |
+
raise ValueError("Input image is too large")
|
| 61 |
secret_data += "====="
|
| 62 |
data_index = 0
|
| 63 |
binary_secret_data = to_bin(secret_data)
|