mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development
This commit is contained in:
commit
66adec8b7d
@ -17,8 +17,7 @@ class NewNLPJobForm(FlaskForm):
|
|||||||
('de', 'German'),
|
('de', 'German'),
|
||||||
('it', 'Italian'),
|
('it', 'Italian'),
|
||||||
('pt', 'Portuguese'),
|
('pt', 'Portuguese'),
|
||||||
('es', 'Spanish')
|
('es', 'Spanish')],
|
||||||
],
|
|
||||||
validators=[DataRequired()]
|
validators=[DataRequired()]
|
||||||
)
|
)
|
||||||
submit = SubmitField('Submit')
|
submit = SubmitField('Submit')
|
||||||
@ -29,8 +28,8 @@ class NewNLPJobForm(FlaskForm):
|
|||||||
version = SelectField(
|
version = SelectField(
|
||||||
'Version',
|
'Version',
|
||||||
choices=[('', 'Choose your option'),
|
choices=[('', 'Choose your option'),
|
||||||
('latest', 'Latest'),
|
('latest', 'Latest (2.1.0)'),
|
||||||
],
|
('2.1.0', '2.1.0')],
|
||||||
validators=[DataRequired()]
|
validators=[DataRequired()]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -60,8 +59,7 @@ class NewOCRJobForm(FlaskForm):
|
|||||||
('frk', 'German Fraktur'),
|
('frk', 'German Fraktur'),
|
||||||
('ita', 'Italian'),
|
('ita', 'Italian'),
|
||||||
('por', 'Portuguese'),
|
('por', 'Portuguese'),
|
||||||
('spa', 'Spanish; Castilian')
|
('spa', 'Spanish; Castilian')],
|
||||||
],
|
|
||||||
validators=[DataRequired()]
|
validators=[DataRequired()]
|
||||||
)
|
)
|
||||||
submit = SubmitField('Submit')
|
submit = SubmitField('Submit')
|
||||||
@ -72,8 +70,7 @@ class NewOCRJobForm(FlaskForm):
|
|||||||
version = SelectField(
|
version = SelectField(
|
||||||
'Version',
|
'Version',
|
||||||
choices=[('', 'Choose your option'),
|
choices=[('', 'Choose your option'),
|
||||||
('latest', 'Latest'),
|
('latest', 'Latest')],
|
||||||
],
|
|
||||||
validators=[DataRequired()]
|
validators=[DataRequired()]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -18,7 +18,9 @@ def nlp():
|
|||||||
mem_mb=4096,
|
mem_mb=4096,
|
||||||
n_cores=2,
|
n_cores=2,
|
||||||
service='nlp',
|
service='nlp',
|
||||||
service_args=json.dumps(['-l {}'.format(new_nlp_job_form.language.data)]),
|
service_args=json.dumps(
|
||||||
|
['-l {}'.format(new_nlp_job_form.language.data)]
|
||||||
|
),
|
||||||
service_version=new_nlp_job_form.version.data,
|
service_version=new_nlp_job_form.version.data,
|
||||||
status='preparing',
|
status='preparing',
|
||||||
title=new_nlp_job_form.title.data)
|
title=new_nlp_job_form.title.data)
|
||||||
@ -45,11 +47,9 @@ def nlp():
|
|||||||
flash('Job created!')
|
flash('Job created!')
|
||||||
return redirect(url_for('services.nlp'))
|
return redirect(url_for('services.nlp'))
|
||||||
|
|
||||||
return render_template(
|
return render_template('services/nlp.html.j2',
|
||||||
'services/nlp.html.j2',
|
|
||||||
title='Natrual Language Processing',
|
title='Natrual Language Processing',
|
||||||
new_nlp_job_form=new_nlp_job_form
|
new_nlp_job_form=new_nlp_job_form)
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@services.route('/ocr', methods=['GET', 'POST'])
|
@services.route('/ocr', methods=['GET', 'POST'])
|
||||||
@ -91,8 +91,6 @@ def ocr():
|
|||||||
flash('Job created!')
|
flash('Job created!')
|
||||||
return redirect(url_for('services.ocr'))
|
return redirect(url_for('services.ocr'))
|
||||||
|
|
||||||
return render_template(
|
return render_template('services/ocr.html.j2',
|
||||||
'services/ocr.html.j2',
|
|
||||||
title='Optical Character Recognition',
|
title='Optical Character Recognition',
|
||||||
new_ocr_job_form=new_ocr_job_form
|
new_ocr_job_form=new_ocr_job_form)
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user