Spaces:
Runtime error
Runtime error
Niv Sardi
commited on
Commit
•
41bc6bd
1
Parent(s):
8f69832
defaults: cleanup
Browse filesSigned-off-by: Niv Sardi <xaiki@evilgiggle.com>
- python/common/defaults.py +21 -11
python/common/defaults.py
CHANGED
@@ -1,16 +1,26 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
CERTS_PATH=f'{DATA_PATH}/certs'
|
6 |
|
7 |
-
|
8 |
-
SQUARES_LABELS_PATH=f'{SQUARES_DATA_PATH}/labels'
|
9 |
-
SQUARES_IMAGES_PATH=f'{SQUARES_DATA_PATH}/images'
|
10 |
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
|
|
|
|
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
import os
|
3 |
|
4 |
+
def D(n, d):
|
5 |
+
return os.environ.get(f'SPOOF_{n}') or d
|
|
|
6 |
|
7 |
+
DATA_PATH = D('DATA_PATH', './data')
|
|
|
|
|
8 |
|
9 |
+
LABELS_PATH = D('LABELS_PATH', f'{DATA_PATH}/labels')
|
10 |
+
IMAGES_PATH = D('IMAGES_PATH', f'{DATA_PATH}/images')
|
11 |
+
CERTS_PATH = D('CERTS_PATH', f'{DATA_PATH}/certs')
|
12 |
|
13 |
+
SQUARES_DATA_PATH = D('SQUARES_DATA_PATH', f'{DATA_PATH}/squares')
|
14 |
+
SQUARES_LABELS_PATH = D('SQUARES_LABELS_PATH', f'{SQUARES_DATA_PATH}/labels')
|
15 |
+
SQUARES_IMAGES_PATH = D('SQUARES_IMAGES_PATH', f'{SQUARES_DATA_PATH}/images')
|
16 |
|
17 |
+
DEBUG_PATH = D('DEBUG_PATH', f'{DATA_PATH}/debug')
|
18 |
+
DEBUG_SQUARES_PATH = D('DEBUG_SQUARES_PATH', f'{DEBUG_PATH}/squares')
|
19 |
+
|
20 |
+
LOGOS_DATA_PATH = D('LOGOS_DATA_PATH', f'{DATA_PATH}/logos')
|
21 |
+
|
22 |
+
AUGMENTED_DATA_PATH = D('AUGMENTED_DATA_PATH', f'{DATA_PATH}/augmented')
|
23 |
+
AUGMENTED_LABELS_PATH = D('AUGMENTED_LABELS_PATH', f'{AUGMENTED_DATA_PATH}/labels')
|
24 |
+
AUGMENTED_IMAGES_PATH = D('AUGMENTED_IMAGES_PATH', f'{AUGMENTED_DATA_PATH}/images')
|
25 |
+
|
26 |
+
MAIN_CSV_PATH = D('MAIN_CSV_PATH', f'{DATA_PATH}/entities.csv')
|