WebashalarForML commited on
Commit
b5338e9
1 Parent(s): 12834c0

Update templates/result.html

Browse files
Files changed (1) hide show
  1. templates/result.html +16 -16
templates/result.html CHANGED
@@ -135,6 +135,7 @@
135
  </div>
136
  {% endif %} {% endwith %}
137
  <div class="container cont mt-5">
 
138
  <div class="d-flex align-items-center justify-content-between">
139
  <h1>Processed Data</h1>
140
  <!-- Reset Button -->
@@ -150,23 +151,24 @@
150
  <!-- PDF Viewer Column -->
151
  <div class="col-md-6 file-container">
152
  {% if file_extension %}
153
- {% if file_extension in ['pdf'] %}
154
- <!-- Display PDF in an iframe -->
155
- <iframe src="{{ file_url }}" title="PDF Viewer" class="file-viewer"></iframe>
156
- {% elif file_extension in ['png', 'jpg', 'jpeg'] %}
157
- <!-- Display Image -->
158
- <img src="{{ file_url }}" alt="Processed Image" class="img-fluid file-viewer" />
159
- {% elif file_extension in ['docx', 'rsf', 'odt'] %}
160
- <!-- Provide Download Link for Non-Viewable Files -->
161
- <a href="{{ file_url }}" class="btn btn-primary" download>Download {{ file_extension | upper }} File</a>
162
- {% else %}
163
- <p>Can't Display This File Type.</p>
164
- {% endif %}
165
  {% else %}
166
- <p>No file uploaded or processed.</p>
 
 
 
167
  {% endif %}
168
  </div>
169
-
170
  <!-- Personal Information Column -->
171
 
172
  <div class="col-md-6">
@@ -398,8 +400,6 @@
398
  </div>
399
  </section>
400
 
401
-
402
-
403
  {% else %}
404
  <p>No data available. Please process a file.</p>
405
  {% endif %}
 
135
  </div>
136
  {% endif %} {% endwith %}
137
  <div class="container cont mt-5">
138
+ {% if parsed_data %}
139
  <div class="d-flex align-items-center justify-content-between">
140
  <h1>Processed Data</h1>
141
  <!-- Reset Button -->
 
151
  <!-- PDF Viewer Column -->
152
  <div class="col-md-6 file-container">
153
  {% if file_extension %}
154
+ {% if file_extension in ['pdf'] %}
155
+ <!-- Display PDF in an iframe -->
156
+ <iframe src="{{ file_url }}" title="PDF Viewer" class="file-viewer"></iframe>
157
+ {% elif file_extension in ['png', 'jpg', 'jpeg'] %}
158
+ <!-- Display Image -->
159
+ <img src="{{ file_url }}" alt="Processed Image" class="img-fluid file-viewer" />
160
+ {% elif file_extension in ['docx', 'rsf', 'odt'] %}
161
+ <!-- Provide Download Link for Non-Viewable Files -->
162
+ <a href="{{ file_url }}" class="btn btn-primary" download>Download {{ file_extension | upper }}
163
+ File</a>
 
 
164
  {% else %}
165
+ <p>Can't Display This File Type.</p>
166
+ {% endif %}
167
+ {% else %}
168
+ <p>No file uploaded or processed.</p>
169
  {% endif %}
170
  </div>
171
+
172
  <!-- Personal Information Column -->
173
 
174
  <div class="col-md-6">
 
400
  </div>
401
  </section>
402
 
 
 
403
  {% else %}
404
  <p>No data available. Please process a file.</p>
405
  {% endif %}