Jacob Logas
commited on
Commit
·
999ff86
1
Parent(s):
f314e57
Initial commit
Browse files- README.md +12 -1
- app.py +10 -0
- requirements.txt +93 -0
README.md
CHANGED
|
@@ -1 +1,12 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Fawkes
|
| 3 |
+
emoji: 🌖
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 3.0.20
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: gpl-3.0
|
| 11 |
+
python_version: 3.8.13
|
| 12 |
+
---
|
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fawkes.protection import Fawkes
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
def predict(level, img):
|
| 5 |
+
fwks = Fawkes("extractor_2", '0', 1, mode=level)
|
| 6 |
+
fwks.run_protection([img], format='jpeg')
|
| 7 |
+
splt = img.split(".")
|
| 8 |
+
return splt[0] + "_cloaked." + splt[1]
|
| 9 |
+
|
| 10 |
+
gr.Interface(fn=predict, inputs=[gr.inputs.Dropdown(["low", "mid", "high"], label="Protection Level"), gr.inputs.Image(type='filepath')], outputs=gr.outputs.Image(type="pil")).launch(share=True)
|
requirements.txt
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
absl-py==0.15.0
|
| 2 |
+
aiohttp==3.8.1
|
| 3 |
+
aiosignal==1.2.0
|
| 4 |
+
analytics-python==1.4.0
|
| 5 |
+
anyio==3.6.1
|
| 6 |
+
astunparse==1.6.3
|
| 7 |
+
async-timeout==4.0.2
|
| 8 |
+
attrs==21.4.0
|
| 9 |
+
backoff==1.10.0
|
| 10 |
+
bcrypt==3.2.2
|
| 11 |
+
bleach==5.0.0
|
| 12 |
+
cachetools==5.2.0
|
| 13 |
+
certifi @ file:///opt/conda/conda-bld/certifi_1655968806487/work/certifi
|
| 14 |
+
cffi==1.15.0
|
| 15 |
+
charset-normalizer==2.0.12
|
| 16 |
+
click==8.1.3
|
| 17 |
+
cryptography==37.0.2
|
| 18 |
+
cycler==0.11.0
|
| 19 |
+
fastapi==0.78.0
|
| 20 |
+
fawkes==1.0.4
|
| 21 |
+
ffmpy==0.3.0
|
| 22 |
+
flatbuffers==1.12
|
| 23 |
+
fonttools==4.33.3
|
| 24 |
+
frozenlist==1.3.0
|
| 25 |
+
fsspec==2022.5.0
|
| 26 |
+
gast==0.3.3
|
| 27 |
+
google-auth==2.8.0
|
| 28 |
+
google-auth-oauthlib==0.4.6
|
| 29 |
+
google-pasta==0.2.0
|
| 30 |
+
gradio==3.0.20
|
| 31 |
+
grpcio==1.32.0
|
| 32 |
+
h11==0.13.0
|
| 33 |
+
h5py==2.10.0
|
| 34 |
+
idna==3.3
|
| 35 |
+
importlib-metadata==4.11.4
|
| 36 |
+
Jinja2==3.1.2
|
| 37 |
+
Keras==2.4.3
|
| 38 |
+
Keras-Preprocessing==1.1.2
|
| 39 |
+
kiwisolver==1.4.3
|
| 40 |
+
linkify-it-py==1.0.3
|
| 41 |
+
Markdown==3.3.7
|
| 42 |
+
markdown-it-py==2.1.0
|
| 43 |
+
MarkupSafe==2.1.1
|
| 44 |
+
matplotlib==3.5.2
|
| 45 |
+
mdit-py-plugins==0.3.0
|
| 46 |
+
mdurl==0.1.1
|
| 47 |
+
monotonic==1.6
|
| 48 |
+
mtcnn==0.1.1
|
| 49 |
+
multidict==6.0.2
|
| 50 |
+
numpy==1.19.5
|
| 51 |
+
oauthlib==3.2.0
|
| 52 |
+
opencv-python==4.6.0.66
|
| 53 |
+
opt-einsum==3.3.0
|
| 54 |
+
orjson==3.7.3
|
| 55 |
+
packaging==21.3
|
| 56 |
+
pandas==1.4.3
|
| 57 |
+
paramiko==2.11.0
|
| 58 |
+
Pillow==9.1.1
|
| 59 |
+
protobuf==3.19.4
|
| 60 |
+
pyasn1==0.4.8
|
| 61 |
+
pyasn1-modules==0.2.8
|
| 62 |
+
pycparser==2.21
|
| 63 |
+
pycryptodome==3.15.0
|
| 64 |
+
pydantic==1.9.1
|
| 65 |
+
pydub==0.25.1
|
| 66 |
+
PyNaCl==1.5.0
|
| 67 |
+
pyparsing==3.0.9
|
| 68 |
+
python-dateutil==2.8.2
|
| 69 |
+
python-multipart==0.0.5
|
| 70 |
+
pytz==2022.1
|
| 71 |
+
PyYAML==6.0
|
| 72 |
+
requests==2.28.0
|
| 73 |
+
requests-oauthlib==1.3.1
|
| 74 |
+
rsa==4.8
|
| 75 |
+
scipy==1.8.1
|
| 76 |
+
six==1.15.0
|
| 77 |
+
sniffio==1.2.0
|
| 78 |
+
starlette==0.19.1
|
| 79 |
+
tensorboard==2.9.1
|
| 80 |
+
tensorboard-data-server==0.6.1
|
| 81 |
+
tensorboard-plugin-wit==1.8.1
|
| 82 |
+
tensorflow==2.4.1
|
| 83 |
+
tensorflow-estimator==2.4.0
|
| 84 |
+
termcolor==1.1.0
|
| 85 |
+
typing_extensions==4.2.0
|
| 86 |
+
uc-micro-py==1.0.1
|
| 87 |
+
urllib3==1.26.9
|
| 88 |
+
uvicorn==0.18.1
|
| 89 |
+
webencodings==0.5.1
|
| 90 |
+
Werkzeug==2.1.2
|
| 91 |
+
wrapt==1.12.1
|
| 92 |
+
yarl==1.7.2
|
| 93 |
+
zipp==3.8.0
|