Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
d68f30db
Commit
d68f30db
authored
2 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Add transkribus models
parent
d076b251
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models.py
+8
-4
8 additions, 4 deletions
app/models.py
app/sqlalchemy_type_decorators.py
+0
-0
0 additions, 0 deletions
app/sqlalchemy_type_decorators.py
with
8 additions
and
4 deletions
app/models.py
+
8
−
4
View file @
d68f30db
from
app
import
db
,
login
from
app.converters.vrt
import
normalize_vrt_file
from
app.sqlalchemy_
custom_type
s
import
ContainerColumn
,
IntEnumColumn
from
app.sqlalchemy_
type_decorator
s
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
...
...
This diff is collapsed.
Click to expand it.
app/sqlalchemy_
custom_type
s.py
→
app/sqlalchemy_
type_decorator
s.py
+
0
−
0
View file @
d68f30db
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment