SAVAI123's picture
Update templates/index.html
0741f17 verified
<!-- templates/index.html -->
<!DOCTYPE html>
<html>
<head>
<title>StyleGAN3 Age Transformation</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.container {
border: 1px solid #ddd;
border-radius: 5px;
padding: 20px;
margin-top: 20px;
}
.error {
color: red;
margin-bottom: 15px;
}
.button {
background-color: #4CAF50;
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 10px 2px;
cursor: pointer;
border-radius: 4px;
}
.file-input {
margin: 10px 0;
}
</style>
</head>
<body>
<h1>StyleGAN3 Age Transformation</h1>
<p>Upload a face image to make it look younger using StyleGAN3.</p>
<div class="container">
{% if error %}
<div class="error">
<p>{{ error }}</p>
</div>
{% endif %}
<form action="/" method="post" enctype="multipart/form-data">
<div class="file-input">
<label for="file">Select image:</label>
<input type="file" id="file" name="file" accept="image/*">
</div>
<input type="submit" value="Transform" class="button">
</form>
</div>
<div class="container">
<h3>Notes:</h3>
<ul>
<li>This application works best with front-facing portrait photos.</li>
<li>The current implementation uses a random latent vector rather than encoding your actual image.</li>
<li>To get accurate results, a proper encoder would need to be implemented.</li>
</ul>
</div>
</body>
</html>