imseldrith commited on
Commit
ecb0718
1 Parent(s): 13942c8

Update templates/output.html

Browse files
Files changed (1) hide show
  1. templates/output.html +13 -2
templates/output.html CHANGED
@@ -122,8 +122,19 @@
122
  <body>
123
  <div class="container">
124
  <h1>Generated Image</h1>
125
- <div class="image-container">
126
- <img src="{{ url_for('output_files', filename='filename') }}" alt="Generated Image" onclick="toggleImageSize(this)">
 
 
 
 
 
 
 
 
 
 
 
127
  </div>
128
  <div class="button-container">
129
  <a href="/output_files/output.png" class="btn btn-success" onclick="downloadImage()"><i class="fas fa-download"></i> Download Image</a>
 
122
  <body>
123
  <div class="container">
124
  <h1>Generated Image</h1>
125
+ <div class="container">
126
+ <h1>Generated Output</h1>
127
+ <div class="output-container">
128
+ {% if filename.endswith('.jpg') or filename.endswith('.png') or filename.endswith('.jpeg') %}
129
+ <img src="{{ url_for('output_files', filename=filename) }}" alt="Generated Image" onclick="toggleImageSize(this)">
130
+ {% elif filename.endswith('.mp4') or filename.endswith('.avi') or filename.endswith('.mov') %}
131
+ <video controls>
132
+ <source src="{{ url_for('output_files', filename=filename) }}" type="video/mp4">
133
+ Your browser does not support the video tag.
134
+ </video>
135
+ {% else %}
136
+ <p>Unsupported file format: {{ filename }}</p>
137
+ {% endif %}
138
  </div>
139
  <div class="button-container">
140
  <a href="/output_files/output.png" class="btn btn-success" onclick="downloadImage()"><i class="fas fa-download"></i> Download Image</a>