Rooni commited on
Commit
2d66a7e
·
verified ·
1 Parent(s): 602fff5

Create play.html

Browse files
Files changed (1) hide show
  1. play.html +71 -0
play.html ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- templates/play.html -->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Image Generator</title>
8
+ <style>
9
+ body {
10
+ font-family: Arial, sans-serif;
11
+ margin: 20px;
12
+ }
13
+ form {
14
+ max-width: 600px;
15
+ margin: 0 auto;
16
+ }
17
+ label {
18
+ display: block;
19
+ margin-top: 10px;
20
+ }
21
+ input[type="text"],
22
+ input[type="number"] {
23
+ width: 100%;
24
+ padding: 8px;
25
+ margin-top: 5px;
26
+ }
27
+ button {
28
+ margin-top: 10px;
29
+ padding: 10px 15px;
30
+ background-color: #007bff;
31
+ color: white;
32
+ border: none;
33
+ cursor: pointer;
34
+ }
35
+ button:hover {
36
+ background-color: #0056b3;
37
+ }
38
+ img {
39
+ max-width: 100%;
40
+ margin-top: 20px;
41
+ }
42
+ </style>
43
+ </head>
44
+ <body>
45
+ <h1>Image Generator</h1>
46
+ <form method="POST">
47
+ <label for="prompt">Prompt:</label>
48
+ <input type="text" id="prompt" name="prompt" required>
49
+
50
+ <label for="width">Width:</label>
51
+ <input type="number" id="width" name="width" value="512" min="64" step="8" required>
52
+
53
+ <label for="height">Height:</label>
54
+ <input type="number" id="height" name="height" value="512" min="64" step="8" required>
55
+
56
+ <label for="seed">Seed:</label>
57
+ <input type="number" id="seed" name="seed" value="22" required>
58
+
59
+ <label for="model">Model:</label>
60
+ <input type="text" id="model" name="model" value="black-forest-labs_FLUX.1-dev" required>
61
+
62
+ <label for="key">API Key (optional):</label>
63
+ <input type="text" id="key" name="key">
64
+
65
+ <button type="submit">Generate Image</button>
66
+ </form>
67
+ {% if image %}
68
+ <img src="data:image/png;base64,{{ image }}" alt="Generated Image">
69
+ {% endif %}
70
+ </body>
71
+ </html>