Spaces:
Runtime error
Runtime error
Update templates/result.html
Browse files- templates/result.html +84 -103
templates/result.html
CHANGED
|
@@ -16,7 +16,6 @@
|
|
| 16 |
h1 {
|
| 17 |
color: #e5e5e7;
|
| 18 |
text-align: center;
|
| 19 |
-
/* margin-bottom: 20px; */
|
| 20 |
}
|
| 21 |
|
| 22 |
.cont {
|
|
@@ -90,8 +89,11 @@
|
|
| 90 |
position: absolute;
|
| 91 |
top: 0;
|
| 92 |
right: 15%;
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
| 95 |
}
|
| 96 |
</style>
|
| 97 |
</head>
|
|
@@ -103,12 +105,9 @@
|
|
| 103 |
{{ messages[0] }}
|
| 104 |
</div>
|
| 105 |
{% endif %} {% endwith %}
|
| 106 |
-
|
| 107 |
-
<!-- <div class="alert alert-success mt-4 " id="flash-message">
|
| 108 |
-
sfdsdaa asfcsd sdgsfr sdfgfd jhijunb hun hjujbuy hgbuuuu jjf
|
| 109 |
-
</div> -->
|
| 110 |
</div>
|
| 111 |
-
|
|
|
|
| 112 |
<div class="d-flex align-items-center justify-content-between">
|
| 113 |
<h1>Extracted Details From Image</h1>
|
| 114 |
<!-- Reset Button -->
|
|
@@ -116,133 +115,115 @@
|
|
| 116 |
<a href="{{ url_for('reset_upload') }}" class="btn btn-reset">Reset & Upload New File</a>
|
| 117 |
</div>
|
| 118 |
</div>
|
|
|
|
| 119 |
{% if data %}
|
| 120 |
<!-- Personal Information Section -->
|
| 121 |
<section>
|
| 122 |
<h3 class="section-title">Extracted Information</h3>
|
| 123 |
<div class="row">
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
<div class="card">
|
| 126 |
<div class="card-body">
|
| 127 |
-
<div class="card">
|
| 128 |
-
<div class="card-body">
|
| 129 |
-
{% if data.extracted_text.items() %}
|
| 130 |
-
<h5 class="card-title">Extracted Image:</h5>
|
| 131 |
-
<ul>
|
| 132 |
-
{% for filename, text in data.extracted_text.items() %}
|
| 133 |
-
<li>{{ filename }}:</li>
|
| 134 |
-
<img src="{{ Img[filename] }}" alt="Processed Image" class="img-fluid" />
|
| 135 |
-
<h5 class="card-title">Extracted Text:</h5>
|
| 136 |
-
<li>{{ text }}</li>
|
| 137 |
-
{% endfor %}
|
| 138 |
-
</ul>
|
| 139 |
-
{% endif %}
|
| 140 |
-
</div>
|
| 141 |
-
</div>
|
| 142 |
-
|
| 143 |
{% if data.name and data.name is iterable and data.name is not string %}
|
| 144 |
-
<
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
</ul>
|
| 153 |
-
</div>
|
| 154 |
{% endif %}
|
| 155 |
|
| 156 |
-
{% if data.Designation and data.Designation is iterable and data.Designation is not string
|
| 157 |
-
|
| 158 |
-
<
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
{% endfor %}
|
| 166 |
-
</ul>
|
| 167 |
-
</div>
|
| 168 |
{% endif %}
|
| 169 |
|
| 170 |
-
{% if data.contact_number and data.contact_number is iterable and data.contact_number is not
|
| 171 |
-
|
| 172 |
-
<
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
{% endfor %}
|
| 180 |
-
</ul>
|
| 181 |
-
</div>
|
| 182 |
{% endif %}
|
| 183 |
|
| 184 |
{% if data.email and data.email is iterable and data.email is not string %}
|
| 185 |
-
<
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
</ul>
|
| 194 |
-
</div>
|
| 195 |
{% endif %}
|
| 196 |
|
| 197 |
{% if data.Location and data.Location is iterable and data.Location is not string %}
|
| 198 |
-
<
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
</ul>
|
| 207 |
-
</div>
|
| 208 |
{% endif %}
|
| 209 |
|
| 210 |
{% if data.Link and data.Link is iterable and data.Link is not string %}
|
| 211 |
-
<
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
</ul>
|
| 220 |
-
</div>
|
| 221 |
{% endif %}
|
| 222 |
|
| 223 |
{% if data.Company and data.Company is iterable and data.Company is not string %}
|
| 224 |
-
<
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
</ul>
|
| 233 |
-
</div>
|
| 234 |
{% endif %}
|
| 235 |
-
|
| 236 |
</div>
|
| 237 |
</div>
|
| 238 |
</div>
|
| 239 |
</div>
|
| 240 |
</section>
|
| 241 |
-
|
| 242 |
{% else %}
|
| 243 |
<p>No data available. Please process a file.</p>
|
| 244 |
{% endif %}
|
| 245 |
-
</div>
|
| 246 |
|
| 247 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
| 248 |
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
|
@@ -260,4 +241,4 @@
|
|
| 260 |
</script>
|
| 261 |
</body>
|
| 262 |
|
| 263 |
-
</html>
|
|
|
|
| 16 |
h1 {
|
| 17 |
color: #e5e5e7;
|
| 18 |
text-align: center;
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
.cont {
|
|
|
|
| 89 |
position: absolute;
|
| 90 |
top: 0;
|
| 91 |
right: 15%;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.image-container img {
|
| 95 |
+
max-width: 100%;
|
| 96 |
+
border-radius: 10px;
|
| 97 |
}
|
| 98 |
</style>
|
| 99 |
</head>
|
|
|
|
| 105 |
{{ messages[0] }}
|
| 106 |
</div>
|
| 107 |
{% endif %} {% endwith %}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
</div>
|
| 109 |
+
|
| 110 |
+
<div class="container cont mt-5">
|
| 111 |
<div class="d-flex align-items-center justify-content-between">
|
| 112 |
<h1>Extracted Details From Image</h1>
|
| 113 |
<!-- Reset Button -->
|
|
|
|
| 115 |
<a href="{{ url_for('reset_upload') }}" class="btn btn-reset">Reset & Upload New File</a>
|
| 116 |
</div>
|
| 117 |
</div>
|
| 118 |
+
|
| 119 |
{% if data %}
|
| 120 |
<!-- Personal Information Section -->
|
| 121 |
<section>
|
| 122 |
<h3 class="section-title">Extracted Information</h3>
|
| 123 |
<div class="row">
|
| 124 |
+
<!-- Image Container on the Left -->
|
| 125 |
+
<div class="col-md-6 image-container">
|
| 126 |
+
{% if data.extracted_text.items() %}
|
| 127 |
+
<h5 class="card-title">Extracted Image:</h5>
|
| 128 |
+
<ul>
|
| 129 |
+
{% for filename, text in data.extracted_text.items() %}
|
| 130 |
+
<li>{{ filename }}:</li>
|
| 131 |
+
<img src="{{ Img[filename] }}" alt="Processed Image" class="img-fluid" />
|
| 132 |
+
{% endfor %}
|
| 133 |
+
</ul>
|
| 134 |
+
{% endif %}
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<!-- Extracted Text on the Right -->
|
| 138 |
+
<div class="col-md-6">
|
| 139 |
<div class="card">
|
| 140 |
<div class="card-body">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
{% if data.name and data.name is iterable and data.name is not string %}
|
| 142 |
+
<h5 class="card-title">Name:</h5>
|
| 143 |
+
<ul>
|
| 144 |
+
{% for value in data.name %}
|
| 145 |
+
{% if value|lower != 'not found' %}
|
| 146 |
+
<li>{{ value }}</li>
|
| 147 |
+
{% endif %}
|
| 148 |
+
{% endfor %}
|
| 149 |
+
</ul>
|
|
|
|
|
|
|
| 150 |
{% endif %}
|
| 151 |
|
| 152 |
+
{% if data.Designation and data.Designation is iterable and data.Designation is not string %}
|
| 153 |
+
<h5 class="card-title">Designation:</h5>
|
| 154 |
+
<ul>
|
| 155 |
+
{% for value in data.Designation %}
|
| 156 |
+
{% if value|lower != 'not found' %}
|
| 157 |
+
<li>{{ value }}</li>
|
| 158 |
+
{% endif %}
|
| 159 |
+
{% endfor %}
|
| 160 |
+
</ul>
|
|
|
|
|
|
|
|
|
|
| 161 |
{% endif %}
|
| 162 |
|
| 163 |
+
{% if data.contact_number and data.contact_number is iterable and data.contact_number is not string %}
|
| 164 |
+
<h5 class="card-title">Contact number:</h5>
|
| 165 |
+
<ul>
|
| 166 |
+
{% for value in data.contact_number %}
|
| 167 |
+
{% if value|lower != 'not found' %}
|
| 168 |
+
<li>{{ value }}</li>
|
| 169 |
+
{% endif %}
|
| 170 |
+
{% endfor %}
|
| 171 |
+
</ul>
|
|
|
|
|
|
|
|
|
|
| 172 |
{% endif %}
|
| 173 |
|
| 174 |
{% if data.email and data.email is iterable and data.email is not string %}
|
| 175 |
+
<h5 class="card-title">Email:</h5>
|
| 176 |
+
<ul>
|
| 177 |
+
{% for value in data.email %}
|
| 178 |
+
{% if value|lower != 'not found' %}
|
| 179 |
+
<li>{{ value }}</li>
|
| 180 |
+
{% endif %}
|
| 181 |
+
{% endfor %}
|
| 182 |
+
</ul>
|
|
|
|
|
|
|
| 183 |
{% endif %}
|
| 184 |
|
| 185 |
{% if data.Location and data.Location is iterable and data.Location is not string %}
|
| 186 |
+
<h5 class="card-title">Location:</h5>
|
| 187 |
+
<ul>
|
| 188 |
+
{% for value in data.Location %}
|
| 189 |
+
{% if value|lower != 'not found' %}
|
| 190 |
+
<li>{{ value }}</li>
|
| 191 |
+
{% endif %}
|
| 192 |
+
{% endfor %}
|
| 193 |
+
</ul>
|
|
|
|
|
|
|
| 194 |
{% endif %}
|
| 195 |
|
| 196 |
{% if data.Link and data.Link is iterable and data.Link is not string %}
|
| 197 |
+
<h5 class="card-title">Link:</h5>
|
| 198 |
+
<ul>
|
| 199 |
+
{% for value in data.Link %}
|
| 200 |
+
{% if value|lower != 'not found' %}
|
| 201 |
+
<li>{{ value }}</li>
|
| 202 |
+
{% endif %}
|
| 203 |
+
{% endfor %}
|
| 204 |
+
</ul>
|
|
|
|
|
|
|
| 205 |
{% endif %}
|
| 206 |
|
| 207 |
{% if data.Company and data.Company is iterable and data.Company is not string %}
|
| 208 |
+
<h5 class="card-title">Organisation:</h5>
|
| 209 |
+
<ul>
|
| 210 |
+
{% for value in data.Company %}
|
| 211 |
+
{% if value|lower != 'not found' %}
|
| 212 |
+
<li>{{ value }}</li>
|
| 213 |
+
{% endif %}
|
| 214 |
+
{% endfor %}
|
| 215 |
+
</ul>
|
|
|
|
|
|
|
| 216 |
{% endif %}
|
|
|
|
| 217 |
</div>
|
| 218 |
</div>
|
| 219 |
</div>
|
| 220 |
</div>
|
| 221 |
</section>
|
| 222 |
+
|
| 223 |
{% else %}
|
| 224 |
<p>No data available. Please process a file.</p>
|
| 225 |
{% endif %}
|
| 226 |
+
</div>
|
| 227 |
|
| 228 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
| 229 |
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
|
|
|
| 241 |
</script>
|
| 242 |
</body>
|
| 243 |
|
| 244 |
+
</html>
|