1
0
Fork 0
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:
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) 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__)