blob: fe65458a74457b099b78de8c8701feb1b18a22ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import os
from os.path import join
import collections
import logging
from dotenv import load_dotenv
import yaml
from app.models import types
from pathlib import Path
import codecs
codecs.register(lambda name: codecs.lookup('utf8') if name == 'utf8mb4' else None)
# -----------------------------------------------------------------------------
# Click config
# -----------------------------------------------------------------------------
CLICK_GROUPS = {
'process': 'commands/process',
}
# -----------------------------------------------------------------------------
# File I/O
# -----------------------------------------------------------------------------
SELF_CWD = os.path.dirname(os.path.realpath(__file__)) # Script CWD
DIR_APP = str(Path(SELF_CWD).parent.parent.parent)
FP_MODELZOO = join(DIR_APP, 'modelzoo/modelzoo.yaml')
# -----------------------------------------------------------------------------
# Model config
# -----------------------------------------------------------------------------
with open(FP_MODELZOO, 'r') as fp:
MODELZOO_CFG = yaml.load(fp, Loader=yaml.Loader)
|