Spaces:
Running
Running
Daniel Gil-U Fuhge
commited on
Commit
•
450393a
1
Parent(s):
feb48ca
update paths
Browse files
src/preprocessing/preprocessing.py
CHANGED
@@ -86,6 +86,8 @@ def compute_embedding(path: str, model_path: str, save: str = None) -> pd.DataFr
|
|
86 |
# Canonicalize
|
87 |
current_svg.canonicalize() # Applies DeepSVG canonicalize; previously custom methods were used
|
88 |
decomposed_svgs[id] = current_svg.to_str()
|
|
|
|
|
89 |
if not os.path.exists('data/temp_svg'):
|
90 |
os.mkdir('data/temp_svg')
|
91 |
with open(('data/temp_svg/path_' + str(id)) + '.svg', 'w') as svg_file:
|
|
|
86 |
# Canonicalize
|
87 |
current_svg.canonicalize() # Applies DeepSVG canonicalize; previously custom methods were used
|
88 |
decomposed_svgs[id] = current_svg.to_str()
|
89 |
+
if not os.path.exists('data'):
|
90 |
+
os.mkdir('data')
|
91 |
if not os.path.exists('data/temp_svg'):
|
92 |
os.mkdir('data/temp_svg')
|
93 |
with open(('data/temp_svg/path_' + str(id)) + '.svg', 'w') as svg_file:
|