YassineYousfi
commited on
Commit
·
aeb01c6
1
Parent(s):
e3976e8
cv2 you suck
Browse files- app.py +9 -2
- requirements.txt +1 -1
app.py
CHANGED
@@ -7,6 +7,9 @@ import cv2
|
|
7 |
from PIL import Image
|
8 |
|
9 |
|
|
|
|
|
|
|
10 |
def HILL(input_image, operation, message, key):
|
11 |
input_image.seek(0)
|
12 |
buffer = input_image.read()
|
@@ -34,5 +37,9 @@ def HILL(input_image, operation, message, key):
|
|
34 |
stc.embed('tmp/file.png', costs, message, key, 'tmp/stego.png')
|
35 |
return 'tmp/stego.png'
|
36 |
|
37 |
-
iface = gr.Interface(HILL,
|
38 |
-
|
|
|
|
|
|
|
|
|
|
7 |
from PIL import Image
|
8 |
|
9 |
|
10 |
+
title = "Steganography"
|
11 |
+
description = "Wow this works!"
|
12 |
+
|
13 |
def HILL(input_image, operation, message, key):
|
14 |
input_image.seek(0)
|
15 |
buffer = input_image.read()
|
|
|
37 |
stc.embed('tmp/file.png', costs, message, key, 'tmp/stego.png')
|
38 |
return 'tmp/stego.png'
|
39 |
|
40 |
+
iface = gr.Interface(HILL,
|
41 |
+
["file", gr.inputs.Radio(["encode", "decode"]), "text", "text"],
|
42 |
+
"file",
|
43 |
+
title=title,
|
44 |
+
description=description)
|
45 |
+
iface.launch()
|
requirements.txt
CHANGED
@@ -2,4 +2,4 @@ pycryptodome
|
|
2 |
imageio
|
3 |
scipy
|
4 |
Pillow
|
5 |
-
opencv-python
|
|
|
2 |
imageio
|
3 |
scipy
|
4 |
Pillow
|
5 |
+
opencv-python-headless
|