1
0
Fork 0
mirror of https://github.com/qurator-spk/sbb_ner.git synced 2025-06-08 03:40:31 +02:00

load configuration realitve to working directory

This commit is contained in:
Kai Labusch 2025-04-04 14:39:24 +02:00
parent c90d075f72
commit 00be69912c

View file

@ -16,8 +16,9 @@ from pytorch_pretrained_bert.modeling import (CONFIG_NAME,
BertForTokenClassification)
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)
logger = logging.getLogger(__name__)