sourav520 commited on
Commit
7b3885c
·
verified ·
1 Parent(s): 2f5aa55

Create image_gen.html

Browse files
Files changed (1) hide show
  1. templates/image_gen.html +86 -0
templates/image_gen.html ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
6
+ <title>AI One Image Generator</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap" rel="stylesheet">
10
+ <style>
11
+ body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }
12
+ </style>
13
+ </head>
14
+ <body class="bg-gray-900 text-gray-100 min-h-screen flex items-center justify-center p-6">
15
+ <main class="max-w-3xl w-full mx-auto">
16
+ <div class="bg-gradient-to-br from-slate-800 via-slate-900 to-black rounded-2xl shadow-2xl p-8">
17
+
18
+ <!-- Header -->
19
+ <div class="flex items-center justify-between mb-6">
20
+ <h1 class="text-3xl font-extrabold">Image Generator</h1>
21
+ <div class="text-sm text-slate-400">Model: <span id="model-name">Aione-2.0</span></div>
22
+ </div>
23
+
24
+ <p class="text-slate-400 mb-6">
25
+ Type a clear, descriptive prompt and get a generated image.
26
+ </p>
27
+
28
+ <!-- ✅ Generated image display on top -->
29
+ <div class="bg-slate-800 p-4 rounded-xl flex flex-col items-center mb-6">
30
+ <div id="placeholder"
31
+ class="w-full h-96 rounded-lg bg-gradient-to-br from-slate-700 to-slate-800 flex items-center justify-center text-slate-500 text-center">
32
+ Generated image will appear here
33
+ </div>
34
+ <div style="height:40px" class="w-full mt-4 flex gap-2">
35
+ <!-- Download with icon -->
36
+ <a id="downloadLink"
37
+ class="hidden w-full flex items-center justify-center gap-2 px-4 py-2 rounded-xl bg-indigo-600 font-semibold">
38
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none"
39
+ viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
40
+ <path stroke-linecap="round" stroke-linejoin="round" d="M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2M7 10l5 5m0 0l5-5m-5 5V4" />
41
+ </svg>
42
+ Download PNG
43
+ </a>
44
+ <!-- Copy button -->
45
+ <button style="display:none" id="copyBtn"
46
+ class="hidden w-full text-center px-4 py-2 rounded-xl bg-slate-700">Copy to clipboard</button>
47
+ </div>
48
+ </div>
49
+
50
+ <!-- ✅ Prompt input + Generate button inline (mobile-friendly) -->
51
+ <div class="mb-6">
52
+ <div class="flex items-center gap-2">
53
+ <input id="prompt" type="text"
54
+ placeholder="Describe your image..."
55
+ class="flex-grow p-3 rounded-xl bg-slate-800 border border-slate-700 placeholder-slate-500 text-sm sm:text-base" />
56
+ <button id="generateBtn"
57
+ class="p-3 rounded-xl bg-emerald-500 text-black font-semibold hover:brightness-105 flex items-center justify-center">
58
+ <!-- Paper plane icon -->
59
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none"
60
+ viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
61
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 19l9 2-9-18-9 18 9-2z" />
62
+ </svg>
63
+ </button>
64
+ </div>
65
+
66
+ <div class="flex items-center gap-3 mt-4">
67
+ <button id="clearBtn"
68
+ class="hidden px-4 py-2 rounded-xl bg-slate-700 text-slate-200">Clear</button>
69
+ <div id="status" class="text-sm text-slate-400"></div>
70
+ </div>
71
+ </div>
72
+
73
+ <footer class="mt-6 text-slate-500 text-xs text-center">
74
+ You might hit quota limits depending on your plan.
75
+ </footer>
76
+ </div>
77
+ </main>
78
+
79
+ <script src="/static/app.js"></script>
80
+ <script>
81
+ // Update model name dynamically if available
82
+ document.getElementById('model-name').innerText =
83
+ localStorage.getItem('MODEL') || 'Aione-2.0';
84
+ </script>
85
+ </body>
86
+ </html>