update app.py file path
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def img_to_base64(filepath):
|
|
36 |
with open(filepath, "rb") as img_file:
|
37 |
return base64.b64encode(img_file.read()).decode()
|
38 |
|
39 |
-
logo_base64 = img_to_base64("
|
40 |
|
41 |
html_content = f"""
|
42 |
<div style='display: flex; align-items: center; justify-content: center; padding: 20px;'>
|
@@ -47,17 +47,17 @@ html_content = f"""
|
|
47 |
|
48 |
# Examples
|
49 |
examples = [
|
50 |
-
["
|
51 |
-
["
|
52 |
-
["
|
53 |
-
["
|
54 |
-
["
|
55 |
-
["
|
56 |
-
["
|
57 |
-
["
|
58 |
-
["
|
59 |
-
["
|
60 |
-
["
|
61 |
]
|
62 |
|
63 |
default_example = examples[0]
|
@@ -111,7 +111,7 @@ def imgae_model_select(ckp_index=0):
|
|
111 |
model = create_model_editguard(opt)
|
112 |
|
113 |
if ckp_index == 0:
|
114 |
-
model_pth = '
|
115 |
print(model_pth)
|
116 |
model.load_test(model_pth)
|
117 |
return model
|
@@ -270,4 +270,4 @@ with gr.Blocks(css=css, title="EditGuard") as demo:
|
|
270 |
revealing, inputs=[image_edited_1, bit_input, model_list, model], outputs=[edit_mask, bit_output, acc_output]
|
271 |
)
|
272 |
|
273 |
-
demo.launch(server_name="0.0.0.0", server_port=2004, share=True, favicon_path='
|
|
|
36 |
with open(filepath, "rb") as img_file:
|
37 |
return base64.b64encode(img_file.read()).decode()
|
38 |
|
39 |
+
logo_base64 = img_to_base64("./logo.png")
|
40 |
|
41 |
html_content = f"""
|
42 |
<div style='display: flex; align-items: center; justify-content: center; padding: 20px;'>
|
|
|
47 |
|
48 |
# Examples
|
49 |
examples = [
|
50 |
+
["./dataset/examples/0011.png"],
|
51 |
+
["./dataset/examples/0012.png"],
|
52 |
+
["./dataset/examples/0003.png"],
|
53 |
+
["./dataset/examples/0004.png"],
|
54 |
+
["./dataset/examples/0005.png"],
|
55 |
+
["./dataset/examples/0006.png"],
|
56 |
+
["./dataset/examples/0007.png"],
|
57 |
+
["./dataset/examples/0008.png"],
|
58 |
+
["./dataset/examples/0009.png"],
|
59 |
+
["./dataset/examples/0010.png"],
|
60 |
+
["./dataset/examples/0002.png"],
|
61 |
]
|
62 |
|
63 |
default_example = examples[0]
|
|
|
111 |
model = create_model_editguard(opt)
|
112 |
|
113 |
if ckp_index == 0:
|
114 |
+
model_pth = './checkpoints/clean.pth'
|
115 |
print(model_pth)
|
116 |
model.load_test(model_pth)
|
117 |
return model
|
|
|
270 |
revealing, inputs=[image_edited_1, bit_input, model_list, model], outputs=[edit_mask, bit_output, acc_output]
|
271 |
)
|
272 |
|
273 |
+
demo.launch(server_name="0.0.0.0", server_port=2004, share=True, favicon_path='./logo.png')
|