Spaces:
Running
Running
update
Browse files- code/functions.py +2 -2
- users.yaml +21 -0
code/functions.py
CHANGED
@@ -40,7 +40,7 @@ def process_svg(img, size_value=12, level=1, streamlit=False, kernel_type=cv2.MO
|
|
40 |
kernel = get_kernel_ellipse(size, kernel_type=kernel_type)
|
41 |
img = cv2.erode(img, kernel, iterations=1)
|
42 |
|
43 |
-
cv2.imwrite(image_path, img)
|
44 |
img_array = convert_to_svg_and_back(img)
|
45 |
|
46 |
img_array = binarise(img_array)
|
@@ -70,7 +70,7 @@ def process_svg(img, size_value=12, level=1, streamlit=False, kernel_type=cv2.MO
|
|
70 |
if i > level:
|
71 |
image_final = (image_final + dilate_image_petits_objets)
|
72 |
|
73 |
-
cv2.imwrite("image_finale.png", (255 - image_final))
|
74 |
image = convert_to_svg_and_back((255 - image_final))
|
75 |
return image
|
76 |
def get_kernel_ellipse(size, kernel_type=cv2.MORPH_ELLIPSE):
|
|
|
40 |
kernel = get_kernel_ellipse(size, kernel_type=kernel_type)
|
41 |
img = cv2.erode(img, kernel, iterations=1)
|
42 |
|
43 |
+
#cv2.imwrite(image_path, img)
|
44 |
img_array = convert_to_svg_and_back(img)
|
45 |
|
46 |
img_array = binarise(img_array)
|
|
|
70 |
if i > level:
|
71 |
image_final = (image_final + dilate_image_petits_objets)
|
72 |
|
73 |
+
#cv2.imwrite("image_finale.png", (255 - image_final))
|
74 |
image = convert_to_svg_and_back((255 - image_final))
|
75 |
return image
|
76 |
def get_kernel_ellipse(size, kernel_type=cv2.MORPH_ELLIPSE):
|
users.yaml
CHANGED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
credentials:
|
2 |
+
usernames:
|
3 |
+
hdeferrieres:
|
4 |
+
email: hugues.deferrieres@gmail.com
|
5 |
+
name: Hugues de Ferrieres
|
6 |
+
password: $2b$12$mm/Y4S.x.50vtHVDTqEgSO51ne4JpQEVM20Ao8uJXFffje/4xgkr. # To be replaced with hashed password
|
7 |
+
pdeferieres:
|
8 |
+
email: pdeferrieres@seguin-moreau.fr
|
9 |
+
name: Paul de Ferrieres
|
10 |
+
password: $2b$12$mm/Y4S.x.50vtHVDTqEgSO51ne4JpQEVM20Ao8uJXFffje/4xgkr. # To be replaced with hashed password
|
11 |
+
seguinmoreau:
|
12 |
+
email: contact@seguin-moreau.fr
|
13 |
+
name: Seguin Moreau
|
14 |
+
password: $2b$12$mm/Y4S.x.50vtHVDTqEgSO51ne4JpQEVM20Ao8uJXFffje/4xgkr.
|
15 |
+
cookie:
|
16 |
+
expiry_days: 30
|
17 |
+
key: random_signature_key # Must be string
|
18 |
+
name: random_cookie_name
|
19 |
+
preauthorized:
|
20 |
+
emails:
|
21 |
+
- contact@seguin-moreau.fr
|