mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
Integrate TranskribusHTRModels
This commit is contained in:
@ -53,7 +53,17 @@
|
||||
{{ wtf.render_field(form.pdf, accept='application/pdf', placeholder='Choose a PDF file') }}
|
||||
</div>
|
||||
<div class="col s12 l4">
|
||||
{{ wtf.render_field(form.model, material_icon='language') }}
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">language</i>
|
||||
{{ form.model() }}
|
||||
{{ form.model.label }}
|
||||
<span class="helper-text">
|
||||
<a class="modal-trigger" href="#models-modal">More details about models</a>
|
||||
</span>
|
||||
{% for error in form.model.errors %}
|
||||
<span class="helper-text error-color-text">{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 l3">
|
||||
{{ wtf.render_field(form.version, material_icon='apps') }}
|
||||
@ -138,6 +148,37 @@
|
||||
|
||||
{% block modals %}
|
||||
{{ super() }}
|
||||
<div id="models-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Tesseract OCR Pipeline models</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Description</th>
|
||||
<th>Biblio</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for m in tesseract_ocr_models %}
|
||||
<tr id="tesseract-ocr-model-{{ m.hashid }}">
|
||||
<td>{{ m.title }}</td>
|
||||
{% if m.description == '' %}
|
||||
<td>Description is not available.</td>
|
||||
{% else %}
|
||||
<td>{{ m.description }}</td>
|
||||
{% endif %}
|
||||
<td><a href="{{ m.publisher_url }}">{{ m.publisher }}</a> ({{ m.publishing_year }}), {{ m.title }} {{ m.version}}, <a href="{{ m.publishing_url }}">{{ m.publishing_url }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class="modal-close waves-effect waves-light btn">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="progress-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4><i class="material-icons left">file_upload</i>Uploading files...</h4>
|
||||
|
@ -58,7 +58,17 @@
|
||||
{{ wtf.render_field(form.pdf, accept='application/pdf', placeholder='Choose a PDF file') }}
|
||||
</div>
|
||||
<div class="col s12 l4">
|
||||
{{ wtf.render_field(form.model, material_icon='language') }}
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">language</i>
|
||||
{{ form.model() }}
|
||||
{{ form.model.label }}
|
||||
<span class="helper-text">
|
||||
<a class="modal-trigger" href="#models-modal">More details about models</a>
|
||||
</span>
|
||||
{% for error in form.model.errors %}
|
||||
<span class="helper-text error-color-text">{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 l3">
|
||||
{{ wtf.render_field(form.version, material_icon='apps') }}
|
||||
@ -143,6 +153,29 @@
|
||||
|
||||
{% block modals %}
|
||||
{{ super() }}
|
||||
<div id="models-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Transkribus HTR Pipeline models</h4>
|
||||
<ul class="collapsible popout" id="transkribus-htr-models">
|
||||
{% for m in transkribus_htr_models %}
|
||||
<li id="transkribus-htr-model-{{ m.hashid }}">
|
||||
<div class="collapsible-header"><i class="material-icons">widgets</i>{{ m.transkribus_name }}</div>
|
||||
<div class="collapsible-body">
|
||||
{% for m_info in TRANSKRIBUS_HTR_MODELS %}
|
||||
{% if m_info['modelId'] == m.transkribus_model_id %}
|
||||
{{ m_info|tojson }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class="modal-close waves-effect waves-light btn">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="progress-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4><i class="material-icons left">file_upload</i>Uploading files...</h4>
|
||||
|
Reference in New Issue
Block a user