mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Add transkribus models
This commit is contained in:
parent
d076b25189
commit
d68f30db8b
@ -1,6 +1,6 @@
|
||||
from app import db, login
|
||||
from app.converters.vrt import normalize_vrt_file
|
||||
from app.sqlalchemy_custom_types import ContainerColumn, IntEnumColumn
|
||||
from app.sqlalchemy_type_decorators import ContainerColumn, IntEnumColumn
|
||||
from datetime import datetime, timedelta
|
||||
from enum import IntEnum
|
||||
from flask import current_app, url_for
|
||||
@ -461,10 +461,14 @@ class TranskribusHTRModel(HashidMixin, db.Model):
|
||||
@staticmethod
|
||||
def insert_defaults():
|
||||
user = User.query.filter_by(username='nopaque').first()
|
||||
# models = [
|
||||
# m for m in TRANSKRIBUS_HTR_MODELS if True
|
||||
# and 'creator' in m and m['creator'] == 'Transkribus Team'
|
||||
# and 'docType' in m and m['docType'] == 'handwritten'
|
||||
# ]
|
||||
models = [
|
||||
m for m in TRANSKRIBUS_HTR_MODELS if True
|
||||
and 'creator' in m and m['creator'] == 'Transkribus Team'
|
||||
and 'docType' in m and m['docType'] == 'handwritten'
|
||||
m for m in TRANSKRIBUS_HTR_MODELS
|
||||
if m['modelId'] in [35909, 33744, 33597, 29820, 37789, 13685, 37855, 26124, 37738, 30919, 34763]
|
||||
]
|
||||
for m in models:
|
||||
model = TranskribusHTRModel.query.filter_by(transkribus_model_id=m['modelId']).first() # noqa
|
||||
|
Loading…
Reference in New Issue
Block a user