<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="Robert Turnbull, Mark Otto, Jacob Thornton, and Bootstrap contributors">
  <meta name="generator" content="Hugo 0.84.0">
  <title>Hespi Report</title>

  <link rel="canonical" href="https://getbootstrap.com/docs/5.0/examples/dashboard/">

  <!-- Bootstrap core CSS -->
  <!-- prism for syntax highlighting -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/themes/prism-coy.min.css" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js">
  </script>
  <script src="https://cdn.jsdelivr.net/npm/prismjs-bibtex@2.0.1/prism-bibtex.js"
          integrity="sha256-+dK6uqUp/DnP6ef97s8XcoynBnGe5vM5gvBECH0EB3U=" crossorigin="anonymous">
  </script>
    
  <!-- Favicons -->
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAFVmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4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AwE2sjU2Z6RLlph3HcVaW6ZhcrFLJghL0qZv7gzmAdEnFSg6bO2S9q5RqTuS+46ejX+8BABAkgWO4kCe+1f2NRqHz04sBQCqU9460CXii/PRX/Y/OAKCSB+s0kT+01zCKDv6fAQAc3X+Kw+LaFibX/2TsKP5mQItem2hbmGDkwgygkKpt9klGLoCYiJtYG7L2MHL5B1ZOC0oo1hReAAAAAElFTkSuQmCC" />
  <meta name="theme-color" content="#386603">


  <style>

    {% include 'assets/css/bootstrap.hespi.min.css' %}

    .bd-placeholder-img {
      font-size: 1.125rem;
      text-anchor: middle;
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
    }

    @media (min-width: 768px) {
      .bd-placeholder-img-lg {
        font-size: 3.5rem;
      }
    }
    body {
  font-size: .875rem;
}

.feather {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

/*
 * Sidebar
 */

.sidebar {
  position: fixed;
  top: 0;
  /* rtl:raw:
  right: 0;
  */
  bottom: 0;
  /* rtl:remove */
  left: 0;
  z-index: 100; /* Behind the navbar */
  padding: 48px 0 0; /* Height of navbar */
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

@media (max-width: 767.98px) {
  .sidebar {
    top: 5rem;
  }
}

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - 48px);
  padding-top: .5rem;
  overflow-x: hidden;
  overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
}

.sidebar .nav-link .feather {
  margin-right: 4px;
  color: #727272;
}

.sidebar .nav-link.active {
  color: #386603;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
  color: inherit;
}

.sidebar-heading {
  font-size: .75rem;
  text-transform: uppercase;
}

/*
 * Navbar
 */

.navbar-brand {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, .25);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .navbar-toggler {
  top: .25rem;
  right: 1rem;
}

.navbar .form-control {
  padding: .75rem 1rem;
  border-width: 0;
  border-radius: 0;
}

.form-control-dark {
  color: #fff;
  background-color: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}    
.table td {
   text-align: center;   
}
.table th {
   text-align: center;   
}
dl {
  display: flex;
  flex-flow: row;
  flex-wrap: wrap;
  width: 100%; /* set the container width*/
  overflow: visible;
}
dl dt {
  flex: 0 0 3%;
  text-overflow: ellipsis;
  overflow: hidden;
}
dl dd {
  margin-left: auto;
  text-align: left;
  text-overflow: ellipsis;
  overflow: hidden;
  flex: 0 0 97%
}  
#sidebarMenu {
  padding-top: 0px !important;
}
.tab-content {
  padding-top: 15px;
}
H1 { 
  text-align: center;
  background-color: #386603;
  color: white;
  padding: 30px;
  margin-top: 10px;
  margin-left: 0px;
  margin-right: 0px;
  margin-bottom: 20px;
}
H2 { 
  text-align: center 
}

</style>
</head>

<body>

  <header class="navbar navbar-dark sticky-top bg-light flex-md-nowrap p-0 shadow">
    <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse"
      data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
  </header>

  <div class="container-fluid">
    <div class="row">

      <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block sidebar collapse">
        <div id="brand">
          {% include 'assets/img/hespi-logo2.svg' %}
        </div>
  
        <div class="position-sticky">
          <ul class="nav flex-column pt-2">
            {% for stub in component_files %}
              <li class="nav-item">
                <a class="nav-link {% if loop.first %}active{% endif %}" aria-current="page" href="#"  id="{{ stub }}-tab" data-bs-toggle="tab" data-bs-target="#{{ stub }}" type="button" role="tab" aria-controls="{{ stub }}" aria-selected="true">
                  <span data-feather="image"></span>
                  {{ truncate(stub) }}
                </a>
              </li>
            {% endfor %}
          </ul>
        </div>
      </nav>

      <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
        <div class="tab-content" id="myTabContent">
          {% for stub, files in component_files.items() %}
            <div class="tab-pane fade show {% if loop.first %}active{% endif %}" id="{{ stub }}" role="tabpanel" aria-labelledby="{{ stub }}-tab">
              <h1>{{ stub }}</h1>
              <center>
              <a href='{{ stub }}/{{ stub }}-predictions.jpg'><img src='{{ stub }}/{{ stub }}-predictions.jpg' style="max-width: 400px;"/></a>
              </center>

              <h2>Sheet Components</h2>
              
              <table class="table table-hover table-striped ">
                <thead>
                  <tr>
                    <th scope="col">Component</th>
                    <th scope="col">Image</th>
                  </tr>
                </thead>
                <tbody>
                  {% for file in files %}
                    <tr>
                      <th scope="row">{{ get_classification(file) }}</th>
                      <td><a href='{{ relative_to_output(file) }}'><img src='{{ relative_to_output(file) }}' style="max-width: 400px;"/></a></td>
                    </tr>
                  {% endfor %}  
                </tbody>
              </table>


              {% set my_ocr_df = ocr_df[ocr_df["id"] == stub] %}
              {% if len(my_ocr_df) %}
                <h2>Institutional Labels</h2>
          
                {% for _, row in my_ocr_df.iterrows() %}
                  <center>
                    <a href='{{ relative_to_output(row["predictions"]) }}'><img src='{{ relative_to_output(row["predictions"]) }}' style="max-width: 400px;"/></a>
                    <p>Classification: {{ row["label_classification"] }}</p>
                  </center>

                  <table class="table table-hover table-striped ">
                    <thead>
                      <tr>
                        <th scope="col">Field</th>
                        <th scope="col">Image</th>
                        <th scope="col">Recognized Text</th>
                        <th scope="col">OCR</th>
                        <th scope="col">HTR</th>
                      </tr>
                    </thead>
                    <tbody>
                      {% for field in label_fields %}
                        {% if field in row  %}
                          <tr>
                            <th scope="row">{{ field }}</th>
                            <td>
                              {% if row[field+"_image"] %}
                                <a href='{{ relative_to_output(row[field+"_image"]) }}'><img src='{{ relative_to_output(row[field+"_image"]) }}' style="max-width: 400px;"/></a>
                              {% endif %}
                            </td>
                            <td>{{ row[field] }}</td>
                            <td>{{ row[field+"_Tesseract"] }}</td>
                            <td>{{ row[field+"_TrOCR"] }}</td>
                          </div>
                        {% endif %}
                      {% endfor %}
                    </tbody>
                  </table>


                {% endfor %}
              {% endif %}


            </div>
          {% endfor %}
        </div>        
      </main>
    </div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script>

  <script src="https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js"
    integrity="sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE"
    crossorigin="anonymous"></script>
  <script>
(function () {
  'use strict'

  feather.replace({ 'aria-hidden': 'true' })

})()    
  </script>
</body>

</html>