Spaces:
Running
Running
Update index.html
Browse files- index.html +57 -18
index.html
CHANGED
|
@@ -1,19 +1,58 @@
|
|
| 1 |
-
<!
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 5 |
+
<title>Nyan Jubae Music AI</title>
|
| 6 |
+
<style>
|
| 7 |
+
body{background:#0a0a0a;color:white;font-family:sans-serif;text-align:center;padding:20px}
|
| 8 |
+
input,select{width:90%;padding:15px;margin:10px;border-radius:10px;border:none;font-size:16px}
|
| 9 |
+
button{padding:15px 30px;background:#ff006a;color:white;border:none;border-radius:30px;font-size:18px;margin:20px}
|
| 10 |
+
#lyrics{white-space:pre-wrap;background:#1a1a1a;padding:20px;border-radius:15px;margin-top:20px;text-align:left}
|
| 11 |
+
audio{width:90%;margin-top:20px}
|
| 12 |
+
</style>
|
| 13 |
+
</head>
|
| 14 |
+
<body>
|
| 15 |
+
|
| 16 |
+
<h1>🎵 Nyan Jubae AI</h1>
|
| 17 |
+
<p>Type and make song like Suno</p>
|
| 18 |
+
|
| 19 |
+
<input id="title" placeholder="Song title: Ituk Nyan Jubae">
|
| 20 |
+
<input id="prompt" placeholder="Describe: Acholi love song, Larakaraka beat, happy">
|
| 21 |
+
<select id="style">
|
| 22 |
+
<option>Afrobeat</option>
|
| 23 |
+
<option>Larakaraka Acholi</option>
|
| 24 |
+
<option>R&B Love</option>
|
| 25 |
+
<option>Luganda Dancehall</option>
|
| 26 |
+
</select>
|
| 27 |
+
|
| 28 |
+
<button onclick="generate()">Generate Song</button>
|
| 29 |
+
|
| 30 |
+
<div id="lyrics">Lyrics will appear here...</div>
|
| 31 |
+
<audio id="player" controls></audio>
|
| 32 |
+
|
| 33 |
+
<script>
|
| 34 |
+
async function generate(){
|
| 35 |
+
let title = document.getElementById('title').value || "Ituk Nyan Jubae";
|
| 36 |
+
let prompt = document.getElementById('prompt').value;
|
| 37 |
+
let style = document.getElementById('style').value;
|
| 38 |
+
let div = document.getElementById('lyrics');
|
| 39 |
+
|
| 40 |
+
div.innerText = "Generating... "+title+" ("+style+")\n\nWait 10 seconds...";
|
| 41 |
+
|
| 42 |
+
// STEP 1: Generate lyrics (offline AI simulation)
|
| 43 |
+
let lyrics = `[Verse]\n${title}, in itye kwene?\nAneno in i ceng, cwinya oyeng\n${prompt}\n\n[Chorus]\nItuk Nyan Jubae, amari in\nWan wa bimedo, forever\nItuk Nyan Jubae, i cunya\n\n[Beat: ${style}]`;
|
| 44 |
+
|
| 45 |
+
div.innerText = lyrics;
|
| 46 |
+
|
| 47 |
+
// STEP 2: Generate beat - using free tone.js (offline)
|
| 48 |
+
// For real AI music, replace this fetch with your HuggingFace token
|
| 49 |
+
try{
|
| 50 |
+
// Demo beat (you will replace with API later)
|
| 51 |
+
div.innerText += "\n\n✅ Lyrics ready! \n\nTo add real AI voice, add your HuggingFace token in script.js line 40";
|
| 52 |
+
// Player placeholder - when you connect API, MP3 will play here
|
| 53 |
+
}catch(e){ div.innerText = "Error: "+e }
|
| 54 |
+
}
|
| 55 |
+
</script>
|
| 56 |
+
|
| 57 |
+
</body>
|
| 58 |
+
</html>
|