Spaces:
Sleeping
Sleeping
WebashalarForML
commited on
Update templates/result.html
Browse files- templates/result.html +267 -264
templates/result.html
CHANGED
@@ -1,264 +1,267 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="en">
|
3 |
-
|
4 |
-
<head>
|
5 |
-
<meta charset="UTF-8"
|
6 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
7 |
-
<title>Processed
|
8 |
-
<link
|
9 |
-
<
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
color: #
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
color: #
|
86 |
-
}
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
}
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
}
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
<
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
</
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
</
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8" />
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7 |
+
<title>Processed Results</title>
|
8 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" />
|
9 |
+
<style>
|
10 |
+
body {
|
11 |
+
background-color: #1c1c1e;
|
12 |
+
font-family: "Poppins", sans-serif;
|
13 |
+
color: #f5f5f7;
|
14 |
+
}
|
15 |
+
|
16 |
+
h1 {
|
17 |
+
color: #e5e5e7;
|
18 |
+
text-align: center;
|
19 |
+
/* margin-bottom: 20px; */
|
20 |
+
}
|
21 |
+
|
22 |
+
.cont {
|
23 |
+
background-color: #2c2c2e;
|
24 |
+
padding: 30px;
|
25 |
+
border-radius: 15px;
|
26 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
|
27 |
+
transition: 1s ease;
|
28 |
+
}
|
29 |
+
|
30 |
+
.section-title {
|
31 |
+
color: #ee4410;
|
32 |
+
font-size: 1.5rem;
|
33 |
+
font-weight: bold;
|
34 |
+
margin-top: 20px;
|
35 |
+
border-bottom: 2px solid #ee4410;
|
36 |
+
padding-bottom: 10px;
|
37 |
+
}
|
38 |
+
|
39 |
+
.card {
|
40 |
+
background-color: #3a3a3c;
|
41 |
+
color: #f5f5f7;
|
42 |
+
border-radius: 10px;
|
43 |
+
margin-bottom: 15px;
|
44 |
+
padding: 15px;
|
45 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
|
46 |
+
transition: background-color 0.3s ease;
|
47 |
+
}
|
48 |
+
|
49 |
+
.card:hover {
|
50 |
+
background-color: #3a3a3c98;
|
51 |
+
}
|
52 |
+
|
53 |
+
.card-title {
|
54 |
+
color: #ee4410;
|
55 |
+
font-size: 1.2rem;
|
56 |
+
font-weight: bold;
|
57 |
+
}
|
58 |
+
|
59 |
+
.card-text {
|
60 |
+
color: #d1d1d6;
|
61 |
+
font-size: 1rem;
|
62 |
+
}
|
63 |
+
|
64 |
+
ul {
|
65 |
+
list-style-type: none;
|
66 |
+
padding-left: 0;
|
67 |
+
}
|
68 |
+
|
69 |
+
li::before {
|
70 |
+
content: "• ";
|
71 |
+
color: #ee4410;
|
72 |
+
}
|
73 |
+
|
74 |
+
.btn-reset {
|
75 |
+
background-color: #ff9f0a;
|
76 |
+
color: white;
|
77 |
+
border: none;
|
78 |
+
padding: 10px 20px;
|
79 |
+
border-radius: 5px;
|
80 |
+
transition: background-color 0.3s ease;
|
81 |
+
margin-bottom: 20px;
|
82 |
+
}
|
83 |
+
|
84 |
+
.btn-reset:hover {
|
85 |
+
background-color: #e03a2f;
|
86 |
+
}
|
87 |
+
|
88 |
+
.alert {
|
89 |
+
text-align: center;
|
90 |
+
position: absolute;
|
91 |
+
top: 0;
|
92 |
+
right: 15%;
|
93 |
+
/* right: 50%;
|
94 |
+
transform: translateX(-50%); */
|
95 |
+
}
|
96 |
+
</style>
|
97 |
+
</head>
|
98 |
+
|
99 |
+
<body>
|
100 |
+
<div class="container">
|
101 |
+
{% with messages = get_flashed_messages() %} {% if messages %}
|
102 |
+
<div class="alert alert-success mt-4 " id="flash-message">
|
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 |
+
<div class="container cont mt-5">
|
112 |
+
<div class="d-flex align-items-center justify-content-between">
|
113 |
+
<h1>Extracted Details From Image</h1>
|
114 |
+
<!-- Reset Button -->
|
115 |
+
<div class="text-center mt-4">
|
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 |
+
<div class="col-md-12">
|
125 |
+
<div class="card">
|
126 |
+
<div class="card-body">
|
127 |
+
<div class="card">
|
128 |
+
<div class="card-body">
|
129 |
+
<h5 class="card-title">Extracted Data:</h5>
|
130 |
+
{% if data.extracted_text.items() %}
|
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 |
+
<strong>Text:</strong>
|
136 |
+
<p>{{ text }}</p>
|
137 |
+
{% endfor %}
|
138 |
+
</ul>
|
139 |
+
{% else %}
|
140 |
+
<p>No tools found</p>
|
141 |
+
{% endif %}
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
<div class="card-body">
|
145 |
+
<h5 class="card-title">Name:</h5>
|
146 |
+
{% if data.name is iterable and data.name is not string %}
|
147 |
+
<ul>
|
148 |
+
{% for value in data.name %}
|
149 |
+
<li>{{ value }}</li>
|
150 |
+
{% endfor %}
|
151 |
+
</ul>
|
152 |
+
{% else %}
|
153 |
+
<p>No tools found</p>
|
154 |
+
{% endif %}
|
155 |
+
</div>
|
156 |
+
<div class="card-body">
|
157 |
+
<h5 class="card-title">Name:</h5>
|
158 |
+
{% if data.name is iterable and data.name is not string %}
|
159 |
+
<ul>
|
160 |
+
{% for value in data.name %}
|
161 |
+
<li>{{ value }}</li>
|
162 |
+
{% endfor %}
|
163 |
+
</ul>
|
164 |
+
{% else %}
|
165 |
+
<p>No tools found</p>
|
166 |
+
{% endif %}
|
167 |
+
</div>
|
168 |
+
<div class="card-body">
|
169 |
+
<h5 class="card-title">Designation:</h5>
|
170 |
+
{% if data.Designation is iterable and data.Designation is not string %}
|
171 |
+
<ul>
|
172 |
+
{% for value in data.Designation %}
|
173 |
+
<li>{{ value }}</li>
|
174 |
+
{% endfor %}
|
175 |
+
</ul>
|
176 |
+
{% else %}
|
177 |
+
<p>No tools found</p>
|
178 |
+
{% endif %}
|
179 |
+
</div>
|
180 |
+
<div class="card-body">
|
181 |
+
<h5 class="card-title">Contact number:</h5>
|
182 |
+
{% if data.contact_number is iterable and data.contact_number is not string %}
|
183 |
+
<ul>
|
184 |
+
{% for value in data.contact_number %}
|
185 |
+
<li>{{ value }}</li>
|
186 |
+
{% endfor %}
|
187 |
+
</ul>
|
188 |
+
{% else %}
|
189 |
+
<p>No tools found</p>
|
190 |
+
{% endif %}
|
191 |
+
</div>
|
192 |
+
<div class="card-body">
|
193 |
+
<h5 class="card-title">Email:</h5>
|
194 |
+
{% if data.email is iterable and data.email is not string %}
|
195 |
+
<ul>
|
196 |
+
{% for value in data.email %}
|
197 |
+
<li>{{ value }}</li>
|
198 |
+
{% endfor %}
|
199 |
+
</ul>
|
200 |
+
{% else %}
|
201 |
+
<p>No tools found</p>
|
202 |
+
{% endif %}
|
203 |
+
</div>
|
204 |
+
<div class="card-body">
|
205 |
+
<h5 class="card-title">Location:</h5>
|
206 |
+
{% if data.Location is iterable and data.Location is not string %}
|
207 |
+
<ul>
|
208 |
+
{% for value in data.Location %}
|
209 |
+
<li>{{ value }}</li>
|
210 |
+
{% endfor %}
|
211 |
+
</ul>
|
212 |
+
{% else %}
|
213 |
+
<p>No tools found</p>
|
214 |
+
{% endif %}
|
215 |
+
</div>
|
216 |
+
<div class="card-body">
|
217 |
+
<h5 class="card-title">Link:</h5>
|
218 |
+
{% if data.Link is iterable and data.Link is not string %}
|
219 |
+
<ul>
|
220 |
+
{% for value in data.Link %}
|
221 |
+
<li>{{ value }}</li>
|
222 |
+
{% endfor %}
|
223 |
+
</ul>
|
224 |
+
{% else %}
|
225 |
+
<p>No tools found</p>
|
226 |
+
{% endif %}
|
227 |
+
</div>
|
228 |
+
<div class="card-body">
|
229 |
+
<h5 class="card-title">Organisation:</h5>
|
230 |
+
{% if data.Company is iterable and data.Company is not string %}
|
231 |
+
<ul>
|
232 |
+
{% for value in data.Company %}
|
233 |
+
<li>{{ value }}</li>
|
234 |
+
{% endfor %}
|
235 |
+
</ul>
|
236 |
+
{% else %}
|
237 |
+
<p>No tools found</p>
|
238 |
+
{% endif %}
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
</div>
|
243 |
+
</div>
|
244 |
+
</section>
|
245 |
+
|
246 |
+
{% else %}
|
247 |
+
<p>No data available. Please process a file.</p>
|
248 |
+
{% endif %}
|
249 |
+
</div>
|
250 |
+
|
251 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
252 |
+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
253 |
+
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
|
254 |
+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
255 |
+
<script>
|
256 |
+
setTimeout(function () {
|
257 |
+
let flashMessage = document.getElementById("flash-message");
|
258 |
+
if (flashMessage) {
|
259 |
+
flashMessage.style.transition = "opacity 1s ease";
|
260 |
+
flashMessage.style.opacity = 0;
|
261 |
+
setTimeout(() => flashMessage.remove(), 1000);
|
262 |
+
}
|
263 |
+
}, 3000);
|
264 |
+
</script>
|
265 |
+
</body>
|
266 |
+
|
267 |
+
</html>
|