WebashalarForML commited on
Commit
5566850
·
verified ·
1 Parent(s): 1c08ab9

Update templates/result.html

Browse files
Files changed (1) hide show
  1. templates/result.html +15 -11
templates/result.html CHANGED
@@ -149,20 +149,24 @@
149
  <div class="row">
150
  <!-- PDF Viewer Column -->
151
  <div class="col-md-6 file-container">
152
- {% if file_extension in ['pdf'] %}
153
- <!-- Display PDF in an iframe -->
154
- <iframe src="{{ file_url }}" title="PDF Viewer" class="file-viewer"></iframe>
155
- {% elif file_extension in ['png', 'jpg', 'jpeg'] %}
156
- <!-- Display Image -->
157
- <img src="{{ file_url }}" alt="Processed Image" class="img-fluid file-viewer" />
158
- {% elif file_extension in ['docx', 'rsf', 'odt'] %}
159
- <!-- Provide Download Link for Non-Viewable Files -->
160
- <a href="{{ file_url }}" class="btn btn-primary" download>Download {{ file_extension | upper }} File</a>
 
 
 
 
161
  {% else %}
162
- <p>Can't Display This File Type.</p>
163
  {% endif %}
164
  </div>
165
-
166
  <!-- Personal Information Column -->
167
 
168
  <div class="col-md-6">
 
149
  <div class="row">
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">