remiai3's picture
Upload 10 files
f62f52e verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tiny-GPT2 Text Generation</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f4f4f9;
}
h1 {
text-align: center;
color: #333;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
textarea {
width: 100%;
height: 100px;
margin-bottom: 10px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.output {
margin-top: 20px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
background-color: #f9f9f9;
}
</style>
</head>
<body>
<div class="container">
<h1>Tiny-GPT2 Text Generation</h1>
<form method="POST">
<textarea name="prompt" placeholder="Enter your prompt (e.g., Once upon a time)" required></textarea>
<button type="submit">Generate Text</button>
</form>
{% if generated_text %}
<div class="output">
<h3>Generated Text:</h3>
<p>{{ generated_text }}</p>
</div>
{% endif %}
</div>
</body>
</html>