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