Spaces:
Runtime error
Runtime error
File size: 5,583 Bytes
9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 f944b4f ecb0718 f944b4f ecb0718 13942c8 f944b4f 13942c8 9a60dd2 13942c8 9a60dd2 13942c8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 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 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 |
<!DOCTYPE html>
<html>
<head>
<title>Generated Image</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<style>
body {
background-color: #000000;
color: #ffffff;
font-family: Arial, sans-serif;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 40px;
background-color: #222222;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
margin-bottom: 30px;
}
.image-container {
text-align: center;
margin-bottom: 30px;
}
img {
max-width: 100%;
height: auto;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
cursor: pointer;
}
.enlarged {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.9);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.enlarged img {
max-width: 90%;
max-height: 90%;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.button-container {
text-align: center;
margin-top: 30px;
}
.btn {
background-color: #4CAF50;
color: #ffffff;
padding: 12px 24px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
.btn:hover {
background-color: #45a049;
}
.image-details {
text-align: center;
margin-top: 30px;
font-size: 16px;
}
.social-buttons {
text-align: center;
margin-top: 30px;
}
.social-button {
display: inline-block;
margin-right: 10px;
}
.social-icon {
color: #ffffff;
font-size: 24px;
transition: color 0.3s ease;
}
.social-icon:hover {
color: #4CAF50;
}
footer {
padding: 20px;
text-align: center;
}
/* Responsive Styles */
@media only screen and (max-width: 500px) {
.container {
padding: 20px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Swapped Image/Video</h1>
<div class="container">
<h1>Swapped Output</h1>
<div class="output-container">
{% if filename.endswith('.jpg') or filename.endswith('.png') or filename.endswith('.jpeg') %}
<img src="{{ url_for('output_files', filename=filename) }}" alt="Generated Image" onclick="toggleImageSize(this)">
{% elif filename.endswith('.mp4') or filename.endswith('.avi') or filename.endswith('.mov') %}
<video controls>
<source src="{{ url_for('output_files', filename=filename) }}" type="video/mp4">
Your browser does not support the video tag.
</video>
{% else %}
<p>Unsupported file format: {{ filename }}</p>
{% endif %}
</div>
<div class="button-container">
<a href="{{ url_for('download_output', filename=filename) }}" class="btn btn-success">
<i class="fas fa-download"></i> Download Swapped
</a>
</div>
<div class="social-buttons">
<span class="social-button">
<a href="https://www.facebook.com/octaeldrith" class="social-icon"><i class="fab fa-facebook"></i></a>
</span>
<span class="social-button">
<a href="https://twitter.com/ims_eldrith" class="social-icon"><i class="fab fa-twitter"></i></a>
</span>
<span class="social-button">
<a href="https://www.instagram.com/ims_eldrith" class="social-icon"><i class="fab fa-instagram"></i></a>
</span>
<span class="social-button">
<a href="https://linkedin.com/in/ashiq-hussain" class="social-icon"><i class="fab fa-linkedin"></i></a>
</span>
</div>
</div>
<script>
function downloadImage() {
var link = document.createElement('a');
link.href = '/output_files/filename';
link.download = 'generated_image.jpg';
link.click();
}
function toggleImageSize(image) {
if (image.classList.contains('enlarged')) {
image.classList.remove('enlarged');
} else {
image.classList.add('enlarged');
}
}
</script>
<footer>
<p>Built with ❤️ by <a href="https://codegenius.me" style="color: red;">Ashiq Hussain Mir</a></p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html> |