Spaces:
Running
Running
Update app.py (#3)
Browse files- Update app.py (42ca636e15ea283a7715ef6f75c91e94008d3963)
Co-authored-by: izum00 <soiz1@users.noreply.huggingface.co>
app.py
CHANGED
|
@@ -7,7 +7,8 @@ import torch
|
|
| 7 |
from PIL import Image
|
| 8 |
from scipy.ndimage import binary_dilation, binary_erosion
|
| 9 |
torch.serialization.add_safe_globals([object])
|
| 10 |
-
|
|
|
|
| 11 |
# FAQ:
|
| 12 |
# Why is the detection model needed since the meaningful_diff can already detect watermark masks?
|
| 13 |
# The detection model is trained on a larger, more diverse dataset, and is more robust to different watermark types.
|
|
|
|
| 7 |
from PIL import Image
|
| 8 |
from scipy.ndimage import binary_dilation, binary_erosion
|
| 9 |
torch.serialization.add_safe_globals([object])
|
| 10 |
+
from torch.serialization import add_safe_globals
|
| 11 |
+
add_safe_globals([torch.nn.modules.container.Sequential])
|
| 12 |
# FAQ:
|
| 13 |
# Why is the detection model needed since the meaningful_diff can already detect watermark masks?
|
| 14 |
# The detection model is trained on a larger, more diverse dataset, and is more robust to different watermark types.
|