mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 09:00:40 +00:00
Add version field for ocr job
This commit is contained in:
@ -29,6 +29,13 @@ class NewOCRJobForm(FlaskForm):
|
||||
'Title',
|
||||
validators=[DataRequired(), Length(1, 32)]
|
||||
)
|
||||
version = SelectField(
|
||||
'Version',
|
||||
choices=[('', 'Choose your option'),
|
||||
('latest', 'Latest'),
|
||||
],
|
||||
validators=[DataRequired()]
|
||||
)
|
||||
|
||||
def validate_files(form, field):
|
||||
for file in field.data:
|
||||
@ -62,6 +69,13 @@ class NewNLPJobForm(FlaskForm):
|
||||
'Title',
|
||||
validators=[DataRequired(), Length(1, 32)]
|
||||
)
|
||||
version = SelectField(
|
||||
'Version',
|
||||
choices=[('', 'Choose your option'),
|
||||
('latest', 'Latest'),
|
||||
],
|
||||
validators=[DataRequired()]
|
||||
)
|
||||
|
||||
def validate_files(form, field):
|
||||
for file in field.data:
|
||||
|
@ -28,7 +28,7 @@ def ocr():
|
||||
'requested_memory': 2048,
|
||||
'service': 'ocr',
|
||||
'service_args': {'lang': new_ocr_job_form.language.data,
|
||||
'version': 'latest'
|
||||
'version': new_ocr_job_form.version.data
|
||||
},
|
||||
'status': 'queued'
|
||||
}
|
||||
|
Reference in New Issue
Block a user