Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +110 -23
index.html
CHANGED
|
@@ -1,29 +1,116 @@
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
-
|
| 4 |
<head>
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
| 10 |
</head>
|
| 11 |
-
|
| 12 |
<body>
|
| 13 |
-
|
| 14 |
-
<
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
<
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- index.html content here -->
|
| 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" />
|
| 7 |
+
<title>AI Tentacle Chat - Text to Image Generator</title>
|
| 8 |
+
<link rel="stylesheet" href="style.css" />
|
| 9 |
+
<meta name="theme-color" content="#0f172a" />
|
| 10 |
+
<meta name="description" content="AI chat-bot that takes text input and generates an image of a single tentacle curved into your described shape. Include style, texture, and shape details in your message." />
|
| 11 |
</head>
|
|
|
|
| 12 |
<body>
|
| 13 |
+
<header class="app-header">
|
| 14 |
+
<div class="brand">
|
| 15 |
+
<svg class="logo" viewBox="0 0 24 24" aria-hidden="true">
|
| 16 |
+
<path d="M12 2c5.5 0 10 4.2 10 9.5S15.5 21 12 22c0 0 4-3 4-8.5S12 2 12 2z" fill="currentColor"></path>
|
| 17 |
+
</svg>
|
| 18 |
+
<h1>AI Tentacle Chat Bot</h1>
|
| 19 |
+
</div>
|
| 20 |
+
<nav class="header-links">
|
| 21 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" rel="noopener noreferrer">Built with anycoder</a>
|
| 22 |
+
<a id="model-docs" href="#" target="_blank" rel="noopener noreferrer" aria-label="GPT-5 documentation">GPT-5</a>
|
| 23 |
+
</nav>
|
| 24 |
+
</header>
|
| 25 |
+
|
| 26 |
+
<main class="container">
|
| 27 |
+
<section class="panel left-panel" aria-labelledby="prompt-heading">
|
| 28 |
+
<h2 id="prompt-heading">Chat with AI Bot</h2>
|
| 29 |
+
<p class="helper">Send a text message to the AI chat-bot describing a single tentacle. Include the style, texture, and shape you want it to curve into. The bot will generate an image based on your text input.</p>
|
| 30 |
+
|
| 31 |
+
<form id="prompt-form" novalidate>
|
| 32 |
+
<label class="field" for="prompt">
|
| 33 |
+
<span class="field-label">Chat message</span>
|
| 34 |
+
<textarea id="prompt" name="prompt" rows="6" required placeholder="Describe the single tentacle’s style, texture, and the exact shape it should curve into (e.g., treble clef, heart, S-curve)."></textarea>
|
| 35 |
+
</label>
|
| 36 |
+
|
| 37 |
+
<div class="row">
|
| 38 |
+
<label class="field grow" for="negPrompt">
|
| 39 |
+
<span class="field-label">Negative prompt (optional)</span>
|
| 40 |
+
<input id="negPrompt" name="negPrompt" type="text" placeholder="e.g., multiple tentacles, extra limbs, text, watermark" />
|
| 41 |
+
</label>
|
| 42 |
+
<label class="field small" for="steps">
|
| 43 |
+
<span class="field-label">Steps</span>
|
| 44 |
+
<input id="steps" name="steps" type="number" min="4" max="50" value="20" />
|
| 45 |
+
</label>
|
| 46 |
+
</div>
|
| 47 |
|
| 48 |
+
<div class="row">
|
| 49 |
+
<label class="field small" for="width">
|
| 50 |
+
<span class="field-label">Width</span>
|
| 51 |
+
<input id="width" name="width" type="number" min="256" max="1024" step="64" value="512" />
|
| 52 |
+
</label>
|
| 53 |
+
<label class="field small" for="height">
|
| 54 |
+
<span class="field-label">Height</span>
|
| 55 |
+
<input id="height" name="height" type="number" min="256" max="1024" step="64" value="512" />
|
| 56 |
+
</label>
|
| 57 |
+
|
| 58 |
+
<label class="toggle field">
|
| 59 |
+
<span class="field-label">Use GPU (WebGPU)</span>
|
| 60 |
+
<div class="toggle-wrap">
|
| 61 |
+
<input type="checkbox" id="useGPU" name="useGPU" />
|
| 62 |
+
<span class="toggle-switch" aria-hidden="true"></span>
|
| 63 |
+
</div>
|
| 64 |
+
<span id="gpu-support" class="hint" role="status" aria-live="polite"></span>
|
| 65 |
+
</label>
|
| 66 |
+
</div>
|
| 67 |
+
|
| 68 |
+
<button id="generate" type="submit" class="primary-btn">
|
| 69 |
+
<span class="btn-text">Send Message & Generate Image</span>
|
| 70 |
+
<span class="spinner" aria-hidden="true"></span>
|
| 71 |
+
</button>
|
| 72 |
+
<div id="status" class="status" role="status" aria-live="polite"></div>
|
| 73 |
+
</form>
|
| 74 |
+
|
| 75 |
+
<details class="tips">
|
| 76 |
+
<summary>Prompt tips</summary>
|
| 77 |
+
<ul>
|
| 78 |
+
<li>Always specify it’s a single tentacle.</li>
|
| 79 |
+
<li>Describe the exact shape (e.g., “S-curve”, “heart shape”, “treble clef”).</li>
|
| 80 |
+
<li>Add style and texture cues (glossy, bioluminescent, clay, watercolor, photorealistic).</li>
|
| 81 |
+
<li>Use a negative prompt to avoid extra limbs or multiple tentacles.</li>
|
| 82 |
+
</ul>
|
| 83 |
+
</details>
|
| 84 |
+
</section>
|
| 85 |
+
|
| 86 |
+
<section class="panel right-panel" aria-labelledby="result-heading">
|
| 87 |
+
<div class="result-header">
|
| 88 |
+
<h2 id="result-heading">AI Bot Response</h2>
|
| 89 |
+
<div class="actions">
|
| 90 |
+
<button id="downloadBtn" class="secondary-btn" disabled>Download</button>
|
| 91 |
+
<button id="copySeedBtn" class="secondary-btn" disabled>Copy seed</button>
|
| 92 |
+
</div>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="canvas-wrap">
|
| 95 |
+
<canvas id="resultCanvas" width="512" height="512" role="img" aria-label="Generated tentacle image"></canvas>
|
| 96 |
+
<div id="overlay" class="overlay hidden" aria-hidden="true">
|
| 97 |
+
<div class="loader" aria-hidden="true"></div>
|
| 98 |
+
<p id="overlayText">Loading model…</p>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
<p class="note">Chat Bot Output: Your text message generates a single tentacle image</p>
|
| 102 |
+
</section>
|
| 103 |
+
</main>
|
| 104 |
+
|
| 105 |
+
<footer class="footer">
|
| 106 |
+
<p>Made with transformers.js in the browser. No data leaves your device.</p>
|
| 107 |
+
</footer>
|
| 108 |
+
|
| 109 |
+
<!-- Required transformers.js import snippet -->
|
| 110 |
+
<script type="module">
|
| 111 |
+
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.3';
|
| 112 |
+
</script>
|
| 113 |
+
<script type="module" src="index.js"></script>
|
| 114 |
+
</body>
|
| 115 |
+
</html>
|
| 116 |
+
```
|