mirror of
https://github.com/qurator-spk/sbb_ner.git
synced 2025-06-07 19:35:14 +02:00
load configuration realitve to working directory
This commit is contained in:
parent
c90d075f72
commit
00be69912c
1 changed files with 3 additions and 2 deletions
|
@ -16,8 +16,9 @@ from pytorch_pretrained_bert.modeling import (CONFIG_NAME,
|
||||||
BertForTokenClassification)
|
BertForTokenClassification)
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
app.config.from_json('config.json' if not os.environ.get('CONFIG') else os.environ.get('CONFIG'))
|
app.config.from_file(os.path.join(os.getcwd(),
|
||||||
|
'config.json' if not os.environ.get('CONFIG')
|
||||||
|
else os.environ.get('CONFIG')), load=json.load)
|
||||||
cache = Cache(app)
|
cache = Cache(app)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue