Spaces:
Paused
Paused
File size: 5,538 Bytes
17e5332 7642ef4 | 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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Suno API Video Generator</title>
<style>
body {{
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}}
.container {{
background: white;
border-radius: 20px;
padding: 40px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}}
h1 {{
color: #333;
text-align: center;
margin-bottom: 30px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}}
.form-group {{
margin-bottom: 20px;
}}
label {{
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #555;
}}
input, textarea {{
width: 100%;
padding: 12px;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 16px;
transition: border-color 0.3s;
box-sizing: border-box;
}}
input:focus, textarea:focus {{
outline: none;
border-color: #667eea;
}}
button {{
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 15px 30px;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
width: 100%;
transition: transform 0.2s, box-shadow 0.2s;
}}
button:hover {{
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}}
button:disabled {{
opacity: 0.6;
cursor: not-allowed;
}}
.result {{
margin-top: 30px;
padding: 20px;
background: #f8f9fa;
border-radius: 10px;
display: none;
}}
.result.show {{
display: block;
}}
.loading {{
text-align: center;
margin: 20px 0;
display: none;
}}
.loading.show {{
display: block;
}}
.spinner {{
border: 4px solid #f3f3f3;
border-top: 4px solid #667eea;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto;
}}
@keyframes spin {{
0% {{ transform: rotate(0deg); }}
100% {{ transform: rotate(360deg); }}
}}
.status {{
padding: 10px;
border-radius: 5px;
margin: 10px 0;
display: none;
}}
.status.success {{
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
display: block;
}}
.status.error {{
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
display: block;
}}
</style>
</head>
<body>
<div class="container">
<h1>🎵 Suno AI Audio Generator</h1>
<div class="form-group">
<label for="taskId">Task ID:</label>
<input type="text" id="taskId" placeholder="Enter task ID (e.g., 5c79****be8e)" value="5c79****be8e">
</div>
<div class="form-group">
<label for="audioId">Audio ID:</label>
<input type="text" id="audioId" placeholder="Enter audio ID" value="e231****-****-****-****-****8cadc7dc">
</div>
<button onclick="generateAudio()" id="generateBtn">Generate Audio</button>
<div class="loading" id="loading">
<div class="spinner"></div>
<p>Generating audio... Please wait</p>
</div>
<div class="status" id="status"></div>
<div class="result" id="result">
<h3>Response:</h3>
<pre id="response"></pre>
</div>
</div>
<script>
// Secrets loaded from Python backend
const API_KEY = "{API_KEY}";
const CALLBACK_URL = "{CALLBACK_URL}";
// Make them available globally
window.config = {{
apiKey: API_KEY,
callbackUrl: CALLBACK_URL
}};
</script>
<script src="script.js"></script>
</body>
</html> |