Jacob Logas
commited on
Commit
·
80def82
1
Parent(s):
c709975
Deleting debugging
Browse files
app.py
CHANGED
@@ -3,11 +3,11 @@ import gradio as gr
|
|
3 |
import os
|
4 |
|
5 |
def predict(level, img):
|
6 |
-
print(img)
|
7 |
fwks = Fawkes("extractor_2", '0', 1, mode=level)
|
8 |
fwks.run_protection([img], format='jpeg')
|
9 |
splt = img.split(".")
|
10 |
-
print(os.listdir('/tmp'))
|
11 |
return splt[0] + "_cloaked." + splt[1]
|
12 |
|
13 |
-
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(
|
|
|
3 |
import os
|
4 |
|
5 |
def predict(level, img):
|
6 |
+
# print(img)
|
7 |
fwks = Fawkes("extractor_2", '0', 1, mode=level)
|
8 |
fwks.run_protection([img], format='jpeg')
|
9 |
splt = img.split(".")
|
10 |
+
# print(os.listdir('/tmp'))
|
11 |
return splt[0] + "_cloaked." + splt[1]
|
12 |
|
13 |
+
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()
|