WebashalarForML commited on
Commit
2aee19a
·
verified ·
1 Parent(s): d41ca54

Update templates/text.html

Browse files
Files changed (1) hide show
  1. templates/text.html +223 -223
templates/text.html CHANGED
@@ -1,223 +1,223 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Processed Text</title>
7
- <link
8
- href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
9
- rel="stylesheet"
10
- />
11
- <link
12
- href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.5/font/bootstrap-icons.min.css"
13
- rel="stylesheet"
14
- />
15
- <link
16
- rel="stylesheet"
17
- href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
18
- />
19
- <style>
20
- body {
21
- font-family: "Poppins", sans-serif;
22
- background-color: #121212;
23
- color: #e0e0e0;
24
- margin: 0;
25
- padding: 20px;
26
- }
27
- h1 {
28
- color: #ffffff;
29
- margin-bottom: 20px;
30
- text-align: center;
31
- }
32
- textarea {
33
- width: 100%;
34
- height: 300px;
35
- background-color: #1e1e1e !important;
36
- color: #e0e0e0 !important;
37
- border: 1px solid #444 !important;
38
- border-radius: 5px;
39
- padding: 10px;
40
- margin-bottom: 20px;
41
- resize: none;
42
- }
43
- .btn-custom {
44
- color: white;
45
- border: none;
46
- padding: 10px 20px;
47
- border-radius: 5px;
48
- font-size: 16px;
49
- cursor: pointer;
50
- transition: background-color 0.3s ease;
51
- display: flex;
52
- align-items: center;
53
- gap: 8px;
54
- }
55
- .btn-download {
56
- background-color: #ff9800;
57
- border: 1px solid #ff9800;
58
- }
59
- .btn-download:hover {
60
- background-color: transparent;
61
- border: 1px solid #ff9800;
62
- }
63
- .btn-reupload {
64
- background-color: #2196f3;
65
- border: 1px solid #2196f3;
66
- }
67
- .btn-reupload:hover {
68
- background-color: transparent;
69
- border: 1px solid #2196f3;
70
- }
71
- .btn-next {
72
- background-color: #4caf50;
73
- border: 1px solid #4caf50;
74
- }
75
- .btn-next:hover {
76
- background-color: transparent;
77
- border: 1px solid #4caf50;
78
- }
79
- .text-center {
80
- text-align: center;
81
- }
82
- .top-right {
83
- position: absolute;
84
- top: 20px;
85
- right: 20px;
86
- }
87
- .restart-button {
88
- margin-top: 20px;
89
- margin-left: 20px;
90
- display: flex;
91
- }
92
- .help-message {
93
- margin-top: 20px;
94
- padding: 15px;
95
- background-color: #33333359;
96
- border-radius: 5px;
97
- color: #e0e0e0;
98
- text-align: left;
99
- }
100
- .guide {
101
- background-color: #1e1e1e;
102
- padding: 20px;
103
- border-radius: 10px;
104
- margin-top: 20px;
105
- }
106
- .guide-button {
107
- position: fixed;
108
- top: 20px;
109
- right: 20px;
110
- z-index: 1000;
111
- }
112
-
113
- .guide-button a {
114
- font-size: 16px;
115
- color: #17a2b8;
116
- padding: 5px 10px;
117
- border-radius: 5px;
118
- text-decoration: none;
119
- }
120
-
121
- .guide-button a:hover {
122
- background-color: #138496b9;
123
- }
124
-
125
- .fas.fa-info-circle {
126
- margin-right: 5px;
127
- }
128
- </style>
129
- </head>
130
- <body>
131
- <!-- Guide Button -->
132
- <div class="guide-button">
133
- <a href="{{ url_for('guide') }}" class="btn">
134
- <i class="fas fa-info-circle"></i> Guide
135
- </a>
136
- </div>
137
- <!-- Restart Form -->
138
- <form action="{{ url_for('remove_files') }}" method="post">
139
- <input type="hidden" name="folder_type" value="uploads" />
140
- <div class="restart-button">
141
- <button type="submit" class="btn btn-danger">
142
- <i class="bi bi-arrow-clockwise"></i> Restart
143
- </button>
144
- </div>
145
- </form>
146
- <div class="container position-relative">
147
- <!-- <div class="top-right">
148
- <a href="{{ url_for('download_file') }}" class="btn btn-custom btn-download" title="Download the extracted text">
149
- <i class="bi bi-download"></i> Download Extracted Text
150
- </a>
151
- </div> -->
152
- <h1>Processed Text</h1>
153
- <label for="edited_text">Edit Extracted Text:</label>
154
- <!-- <p class="text-center">Below is the text extracted from your uploaded file. Please review it carefully and make any necessary corrections before proceeding to the next step.</p> -->
155
- <form action="{{ url_for('save_and_download') }}" method="POST">
156
- <div class="form-group">
157
- <div class="progress">
158
- <div
159
- class="progress-bar"
160
- role="progressbar"
161
- style="width: 20%"
162
- aria-valuenow="20"
163
- aria-valuemin="0"
164
- aria-valuemax="100"
165
- >
166
- Step 2 of 5
167
- </div>
168
- </div>
169
- <textarea id="edited_text" name="edited_text" class="form-control">
170
- {{ text }}</textarea
171
- >
172
- </div>
173
- <button type="submit" class="btn btn-custom btn-download mb-4">
174
- <i class="bi bi-download"></i> Save and Download
175
- </button>
176
- </form>
177
- <div class="text-center mb-4">
178
- <form action="{{ url_for('remove_file') }}" method="POST">
179
- <button type="submit" class="btn btn-custom btn-reupload">
180
- <i class="bi bi-upload"></i> Re-Upload
181
- </button>
182
- </form>
183
- </div>
184
- <div class="text-center mt-4">
185
- <form action="{{ url_for('ner_preview') }}" method="GET">
186
- <button type="submit" class="btn btn-custom btn-next">
187
- <i class="bi bi-arrow-right"></i> Next
188
- </button>
189
- </form>
190
- </div>
191
- <div class="guide">
192
- <h5>Instructions:</h5>
193
- <ol>
194
- <li>
195
- Review the extracted text to ensure it accurately reflects the
196
- content of your uploaded file. This preview is crucial for verifying
197
- the data's correctness. If you notice any discrepancies or errors,
198
- you can edit the text directly in the text area above.
199
- </li>
200
- <li>Download text file for further process</li>
201
- </ol>
202
- </div>
203
- {% with messages = get_flashed_messages() %} {% if messages %}
204
- <div class="alert alert-success mt-4" id="flash-message">
205
- {{ messages[0] }} - You can now download your text or re-upload if
206
- needed.
207
- </div>
208
- {% endif %} {% endwith %}
209
- </div>
210
-
211
- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
212
- <script>
213
- setTimeout(function () {
214
- let flashMessage = document.getElementById("flash-message");
215
- if (flashMessage) {
216
- flashMessage.style.transition = "opacity 1s ease";
217
- flashMessage.style.opacity = 0;
218
- setTimeout(() => flashMessage.remove(), 1000);
219
- }
220
- }, 3000);
221
- </script>
222
- </body>
223
- </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Processed Text</title>
7
+ <link
8
+ href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
9
+ rel="stylesheet"
10
+ />
11
+ <link
12
+ href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.5/font/bootstrap-icons.min.css"
13
+ rel="stylesheet"
14
+ />
15
+ <link
16
+ rel="stylesheet"
17
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
18
+ />
19
+ <style>
20
+ body {
21
+ font-family: "Poppins", sans-serif;
22
+ background-color: #121212;
23
+ color: #e0e0e0;
24
+ margin: 0;
25
+ padding: 20px;
26
+ }
27
+ h1 {
28
+ color: #ffffff;
29
+ margin-bottom: 20px;
30
+ text-align: center;
31
+ }
32
+ textarea {
33
+ width: 100%;
34
+ height: 300px;
35
+ background-color: #1e1e1e !important;
36
+ color: #e0e0e0 !important;
37
+ border: 1px solid #444 !important;
38
+ border-radius: 5px;
39
+ padding: 10px;
40
+ margin-bottom: 20px;
41
+ resize: none;
42
+ }
43
+ .btn-custom {
44
+ color: white;
45
+ border: none;
46
+ padding: 10px 20px;
47
+ border-radius: 5px;
48
+ font-size: 16px;
49
+ cursor: pointer;
50
+ transition: background-color 0.3s ease;
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 8px;
54
+ }
55
+ .btn-download {
56
+ background-color: #ff9800;
57
+ border: 1px solid #ff9800;
58
+ }
59
+ .btn-download:hover {
60
+ background-color: transparent;
61
+ border: 1px solid #ff9800;
62
+ }
63
+ .btn-reupload {
64
+ background-color: #2196f3;
65
+ border: 1px solid #2196f3;
66
+ }
67
+ .btn-reupload:hover {
68
+ background-color: transparent;
69
+ border: 1px solid #2196f3;
70
+ }
71
+ .btn-next {
72
+ background-color: #4caf50;
73
+ border: 1px solid #4caf50;
74
+ }
75
+ .btn-next:hover {
76
+ background-color: transparent;
77
+ border: 1px solid #4caf50;
78
+ }
79
+ .text-center {
80
+ text-align: center;
81
+ }
82
+ .top-right {
83
+ position: absolute;
84
+ top: 20px;
85
+ right: 20px;
86
+ }
87
+ .restart-button {
88
+ margin-top: 20px;
89
+ margin-left: 20px;
90
+ display: flex;
91
+ }
92
+ .help-message {
93
+ margin-top: 20px;
94
+ padding: 15px;
95
+ background-color: #33333359;
96
+ border-radius: 5px;
97
+ color: #e0e0e0;
98
+ text-align: left;
99
+ }
100
+ .guide {
101
+ background-color: #1e1e1e;
102
+ padding: 20px;
103
+ border-radius: 10px;
104
+ margin-top: 20px;
105
+ }
106
+ .guide-button {
107
+ position: fixed;
108
+ top: 20px;
109
+ right: 20px;
110
+ z-index: 1000;
111
+ }
112
+
113
+ .guide-button a {
114
+ font-size: 16px;
115
+ color: #17a2b8;
116
+ padding: 5px 10px;
117
+ border-radius: 5px;
118
+ text-decoration: none;
119
+ }
120
+
121
+ .guide-button a:hover {
122
+ background-color: #138496b9;
123
+ }
124
+
125
+ .fas.fa-info-circle {
126
+ margin-right: 5px;
127
+ }
128
+ </style>
129
+ </head>
130
+ <body>
131
+ <!-- Guide Button -->
132
+ <div class="guide-button">
133
+ <a href="{{ url_for('guide') }}" class="btn">
134
+ <i class="fas fa-info-circle"></i> Guide
135
+ </a>
136
+ </div>
137
+ <!-- Restart Form -->
138
+ <form action="{{ url_for('remove_file') }}" method="post">
139
+ <input type="hidden" name="folder_type" value="uploads" />
140
+ <div class="restart-button">
141
+ <button type="submit" class="btn btn-danger">
142
+ <i class="bi bi-arrow-clockwise"></i> Restart
143
+ </button>
144
+ </div>
145
+ </form>
146
+ <div class="container position-relative">
147
+ <!-- <div class="top-right">
148
+ <a href="{{ url_for('download_file') }}" class="btn btn-custom btn-download" title="Download the extracted text">
149
+ <i class="bi bi-download"></i> Download Extracted Text
150
+ </a>
151
+ </div> -->
152
+ <h1>Processed Text</h1>
153
+ <label for="edited_text">Edit Extracted Text:</label>
154
+ <!-- <p class="text-center">Below is the text extracted from your uploaded file. Please review it carefully and make any necessary corrections before proceeding to the next step.</p> -->
155
+ <form action="{{ url_for('save_and_download') }}" method="POST">
156
+ <div class="form-group">
157
+ <div class="progress">
158
+ <div
159
+ class="progress-bar"
160
+ role="progressbar"
161
+ style="width: 20%"
162
+ aria-valuenow="20"
163
+ aria-valuemin="0"
164
+ aria-valuemax="100"
165
+ >
166
+ Step 2 of 5
167
+ </div>
168
+ </div>
169
+ <textarea id="edited_text" name="edited_text" class="form-control">
170
+ {{ text }}</textarea
171
+ >
172
+ </div>
173
+ <button type="submit" class="btn btn-custom btn-download mb-4">
174
+ <i class="bi bi-download"></i> Save and Download
175
+ </button>
176
+ </form>
177
+ <div class="text-center mb-4">
178
+ <form action="{{ url_for('remove_file') }}" method="POST">
179
+ <button type="submit" class="btn btn-custom btn-reupload">
180
+ <i class="bi bi-upload"></i> Re-Upload
181
+ </button>
182
+ </form>
183
+ </div>
184
+ <div class="text-center mt-4">
185
+ <form action="{{ url_for('ner_preview') }}" method="GET">
186
+ <button type="submit" class="btn btn-custom btn-next">
187
+ <i class="bi bi-arrow-right"></i> Next
188
+ </button>
189
+ </form>
190
+ </div>
191
+ <div class="guide">
192
+ <h5>Instructions:</h5>
193
+ <ol>
194
+ <li>
195
+ Review the extracted text to ensure it accurately reflects the
196
+ content of your uploaded file. This preview is crucial for verifying
197
+ the data's correctness. If you notice any discrepancies or errors,
198
+ you can edit the text directly in the text area above.
199
+ </li>
200
+ <li>Download text file for further process</li>
201
+ </ol>
202
+ </div>
203
+ {% with messages = get_flashed_messages() %} {% if messages %}
204
+ <div class="alert alert-success mt-4" id="flash-message">
205
+ {{ messages[0] }} - You can now download your text or re-upload if
206
+ needed.
207
+ </div>
208
+ {% endif %} {% endwith %}
209
+ </div>
210
+
211
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
212
+ <script>
213
+ setTimeout(function () {
214
+ let flashMessage = document.getElementById("flash-message");
215
+ if (flashMessage) {
216
+ flashMessage.style.transition = "opacity 1s ease";
217
+ flashMessage.style.opacity = 0;
218
+ setTimeout(() => flashMessage.remove(), 1000);
219
+ }
220
+ }, 3000);
221
+ </script>
222
+ </body>
223
+ </html>