Spaces:
Running
Running
Update index.html
Browse files- index.html +60 -18
index.html
CHANGED
|
@@ -1,19 +1,61 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="hi">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>AI Video Generator</title>
|
| 7 |
+
<style>
|
| 8 |
+
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #0f172a; color: white; padding: 10px; margin: 0; }
|
| 9 |
+
.card { max-width: 550px; margin: 20px auto; background: #1e293b; padding: 25px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); text-align: center; border: 1px solid #334155; }
|
| 10 |
+
h2 { margin-top: 0; color: #38bdf8; font-size: 22px; }
|
| 11 |
+
textarea { width: 90%; height: 80px; padding: 12px; border: 1px solid #475569; background: #0f172a; color: white; border-radius: 8px; font-size: 14px; margin-bottom: 15px; resize: none; }
|
| 12 |
+
textarea:focus { outline: none; border-color: #38bdf8; }
|
| 13 |
+
button { background: linear-gradient(135deg, #0284c7, #2563eb); color: white; padding: 12px 25px; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: bold; width: 95%; transition: 0.3s; }
|
| 14 |
+
button:hover { opacity: 0.9; }
|
| 15 |
+
#status { margin-top: 15px; font-size: 14px; color: #94a3b8; font-weight: 500; }
|
| 16 |
+
video { margin-top: 15px; width: 100%; border-radius: 8px; display: none; border: 1px solid #475569; }
|
| 17 |
+
</style>
|
| 18 |
+
</head>
|
| 19 |
+
<body>
|
| 20 |
+
|
| 21 |
+
<div class="card">
|
| 22 |
+
<h2>🎬 AI Text to Video Generator</h2>
|
| 23 |
+
<textarea id="prompt" placeholder="Enter prompt (e.g., A cinematic video of a flying car over futuristic city)..."></textarea>
|
| 24 |
+
<button onclick="generateVideo()">✨ Video Banayein</button>
|
| 25 |
+
<p id="status"></p>
|
| 26 |
+
<video id="videoResult" controls autoplay loop></video>
|
| 27 |
+
</div>
|
| 28 |
+
|
| 29 |
+
<script>
|
| 30 |
+
function generateVideo() {
|
| 31 |
+
var prompt = document.getElementById('prompt').value.trim();
|
| 32 |
+
var status = document.getElementById('status');
|
| 33 |
+
var video = document.getElementById('videoResult');
|
| 34 |
+
|
| 35 |
+
if (!prompt) {
|
| 36 |
+
alert("Kripya koi prompt daalein!");
|
| 37 |
+
return;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
status.innerText = "⏳ AI Video generate kar raha hai... Please wait (1-2 min)...";
|
| 41 |
+
video.style.display = "none";
|
| 42 |
+
|
| 43 |
+
// Fast AI Video Generation Engine
|
| 44 |
+
var cleanPrompt = encodeURIComponent(prompt);
|
| 45 |
+
var videoUrl = "https://image.pollinations.ai/prompt/" + cleanPrompt + "?model=video&seed=" + Math.floor(Math.random() * 1000);
|
| 46 |
+
|
| 47 |
+
video.src = videoUrl;
|
| 48 |
+
|
| 49 |
+
video.onloadeddata = function() {
|
| 50 |
+
status.innerText = "✅ Video Tayar Hai!";
|
| 51 |
+
video.style.display = "block";
|
| 52 |
+
};
|
| 53 |
+
|
| 54 |
+
video.onerror = function() {
|
| 55 |
+
status.innerText = "⚠️ Server Busy. Kripya 30 seconds baad retry karein.";
|
| 56 |
+
};
|
| 57 |
+
}
|
| 58 |
+
</script>
|
| 59 |
+
|
| 60 |
+
</body>
|
| 61 |
</html>
|