Spaces:
Running
Running
<html> | |
<head> | |
<title>Image Generator</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.5.0/dist/css/bootstrap.min.css"> | |
<style> | |
body { | |
background-color: #000000; | |
color: #ffffff; | |
font-family: Arial, sans-serif; | |
} | |
.container { | |
max-width: 600px; | |
margin: 0 auto; | |
padding: 40px; | |
background-color: transparent; | |
border-radius: 10px; | |
box-shadow: none; | |
} | |
h1 { | |
text-align: center; | |
margin-bottom: 30px; | |
color: #ffffff; | |
font-weight: 600; | |
letter-spacing: 1px; | |
} | |
label { | |
font-weight: bold; | |
margin-bottom: 10px; | |
color: #ffffff; | |
} | |
textarea, | |
select { | |
width: 100%; | |
padding: 12px; | |
border-radius: 5px; | |
border: 1px solid #dddddd; | |
font-size: 16px; | |
margin-bottom: 20px; | |
color: #555555; | |
background-color: #f9f9f9; | |
} | |
button[type="submit"] { | |
background-color: #ff3366; | |
color: #ffffff; | |
padding: 12px 24px; | |
border: none; | |
border-radius: 5px; | |
cursor: pointer; | |
font-size: 16px; | |
transition: background-color 0.3s ease; | |
display: block; | |
margin: 0 auto; | |
} | |
button[type="submit"]:hover { | |
background-color: #cc0052; | |
} | |
.social-buttons { | |
text-align: center; | |
margin-top: 20px; | |
} | |
.social-button { | |
display: inline-block; | |
margin-right: 10px; | |
} | |
.social-icon { | |
color: #ffffff; | |
font-size: 24px; | |
transition: color 0.3s ease; | |
} | |
.social-icon:hover { | |
color: #ff3366; | |
} | |
.generating-message { | |
text-align: center; | |
margin-bottom: 20px; | |
color: #ffffff; | |
display: none; | |
font-size: 24px; | |
animation: pulse 1s ease-in-out infinite; | |
} | |
@keyframes pulse { | |
0% { | |
transform: scale(1); | |
opacity: 0.7; | |
} | |
50% { | |
transform: scale(1.2); | |
opacity: 1; | |
} | |
100% { | |
transform: scale(1); | |
opacity: 0.7; | |
} | |
} | |
.loading-spinner { | |
display: inline-block; | |
width: 40px; | |
height: 40px; | |
border: 4px solid #ffffff; | |
border-top-color: transparent; | |
border-radius: 50%; | |
animation: spin 1s linear infinite; | |
} | |
@keyframes spin { | |
0% { | |
transform: rotate(0deg); | |
} | |
100% { | |
transform: rotate(360deg); | |
} | |
} | |
.disabled-button { | |
cursor: not-allowed; | |
opacity: 0.6; | |
} | |
footer { | |
padding: 20px; | |
text-align: center; | |
} | |
</style> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1 class="mt-5">Image Generator</h1> | |
<form action="/generate" method="POST" onsubmit="showGeneratingMessage()"> | |
<div class="mb-3"> | |
<label for="prompt" class="form-label">Prompt:</label> | |
<textarea id="prompt" name="prompt" class="form-control" rows="4" cols="50"></textarea> | |
</div> | |
<div class="mb-3"> | |
<label for="style" class="form-label">Choose Style:</label> | |
<select id="style" name="style" class="form-select"> | |
<option value="IMAGINE_V4_Beta">IMAGINE_V4_Beta</option> | |
<option value="IMAGINE_V3">IMAGINE_V3</option> | |
<option value="IMAGINE_V1">IMAGINE_V1</option> | |
<option value="ANIME_V2">ANIME_V2</option> | |
<!-- Add more style options here --> | |
</select> | |
</div> | |
<div class="mb-3"> | |
<label for="ratio" class="form-label">Choose Ratio:</label> | |
<select id="ratio" name="ratio" class="form-select"> | |
<option value="RATIO_4X3">4:3</option> | |
<option value="RATIO_1X1">1:1</option> | |
<option value="RATIO_9X16">9:16</option> | |
<option value="RATIO_16X9">16:9</option> | |
<option value="RATIO_3X2">3:2</option> | |
</select> | |
</div> | |
<button type="submit" class="btn btn-primary" id="generate-button">Generate Image</button> | |
</form> | |
<div class="generating-message"> | |
<span class="loading-spinner"></span> | |
Generating image... Please wait | |
</div> | |
<div class="social-buttons"> | |
<span class="social-button"> | |
<a href="https://www.facebook.com/octaeldrith" class="social-icon"><i class="fab fa-facebook-f"></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://instagram.com/ims_eldrith" class="social-icon"><i class="fab fa-instagram"></i></a> | |
</span> | |
<span class="social-button"> | |
<a href="https://www.linkedin.com/in/ashiq-hussain" class="social-icon"><i class="fab fa-linkedin"></i></a> | |
</span> | |
</div> | |
</div> | |
<footer> | |
<p>Built with ❤️ by <a href="https://codegenius.me" style="color: red;">Ashiq Hussain Mir</a></p> | |
</footer> | |
<script> | |
function showGeneratingMessage() { | |
var generatingMessage = document.querySelector('.generating-message'); | |
generatingMessage.style.display = 'block'; | |
document.getElementById('generate-button').classList.add('disabled-button'); | |
setTimeout(function () { | |
generatingMessage.style.display = 'none'; | |
document.getElementById('generate-button').classList.remove('disabled-button'); | |
}, 5000); | |
} | |
</script> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.5.0/dist/js/bootstrap.bundle.min.js"></script> | |
</body> | |
</html> | |