batnyan commited on
Commit
47a94ec
·
verified ·
1 Parent(s): 3e09b49

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +364 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Mmmm
3
- emoji: 🌍
4
  colorFrom: yellow
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: mmmm
3
+ emoji: 🐳
4
  colorFrom: yellow
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,364 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>MelodyAI - Create Music with AI</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
11
+
12
+ body {
13
+ font-family: 'Inter', sans-serif;
14
+ background-color: #f8fafc;
15
+ }
16
+
17
+ .gradient-bg {
18
+ background: linear-gradient(135deg, #6b21a8 0%, #2563eb 100%);
19
+ }
20
+
21
+ .music-card:hover .play-button {
22
+ opacity: 1;
23
+ transform: translateY(0);
24
+ }
25
+
26
+ .waveform {
27
+ height: 40px;
28
+ background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 50%, #e2e8f0 100%);
29
+ background-size: 200% 100%;
30
+ animation: wave 2s linear infinite;
31
+ border-radius: 4px;
32
+ }
33
+
34
+ @keyframes wave {
35
+ 0% { background-position: 0% 50%; }
36
+ 100% { background-position: 200% 50%; }
37
+ }
38
+
39
+ .fade-in {
40
+ animation: fadeIn 0.3s ease-in-out;
41
+ }
42
+
43
+ @keyframes fadeIn {
44
+ from { opacity: 0; transform: translateY(10px); }
45
+ to { opacity: 1; transform: translateY(0); }
46
+ }
47
+
48
+ .recording {
49
+ animation: pulse 1.5s infinite;
50
+ }
51
+
52
+ @keyframes pulse {
53
+ 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
54
+ 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
55
+ 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
56
+ }
57
+
58
+ .progress-bar {
59
+ height: 6px;
60
+ background-color: #e2e8f0;
61
+ border-radius: 3px;
62
+ overflow: hidden;
63
+ }
64
+
65
+ .progress-fill {
66
+ height: 100%;
67
+ background-color: #6b21a8;
68
+ width: 0%;
69
+ transition: width 0.3s ease;
70
+ }
71
+ </style>
72
+ </head>
73
+ <body class="min-h-screen">
74
+ <!-- Navigation -->
75
+ <nav class="bg-white shadow-sm">
76
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
77
+ <div class="flex justify-between h-16">
78
+ <div class="flex items-center">
79
+ <div class="flex-shrink-0 flex items-center">
80
+ <svg class="h-8 w-8 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
81
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/>
82
+ </svg>
83
+ <span class="ml-2 text-xl font-bold text-gray-900">MelodyAI</span>
84
+ </div>
85
+ </div>
86
+ <div class="hidden sm:ml-6 sm:flex sm:items-center">
87
+ <div class="ml-4 relative flex-shrink-0">
88
+ <div class="rounded-full bg-gray-200 h-8 w-8 flex items-center justify-center">
89
+ <i class="fas fa-user text-gray-600"></i>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </nav>
96
+
97
+ <!-- Main Content -->
98
+ <div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
99
+ <div class="text-center mb-12">
100
+ <h1 class="text-3xl font-bold text-gray-900 mb-2">Create Your AI Music</h1>
101
+ <p class="text-gray-600">Describe your song or hum a melody, and our AI will generate a complete musical composition.</p>
102
+ </div>
103
+
104
+ <!-- Creation Interface -->
105
+ <div class="bg-white rounded-xl shadow-md overflow-hidden">
106
+ <div class="p-6">
107
+ <!-- Tab Navigation -->
108
+ <div class="flex border-b border-gray-200">
109
+ <button id="text-tab" class="px-4 py-2 font-medium text-sm border-b-2 border-purple-500 text-purple-600">Text Prompt</button>
110
+ <button id="voice-tab" class="px-4 py-2 font-medium text-sm border-b-2 border-transparent text-gray-500 hover:text-gray-700">Voice/Hum</button>
111
+ </div>
112
+
113
+ <!-- Text Prompt Tab Content -->
114
+ <div id="text-content" class="mt-6">
115
+ <div class="mb-4">
116
+ <label for="prompt" class="block text-sm font-medium text-gray-700 mb-2">Describe your song</label>
117
+ <textarea id="prompt" rows="4" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500" placeholder="e.g. A cheerful pop song about summer love with acoustic guitar and upbeat drums"></textarea>
118
+ </div>
119
+
120
+ <div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6">
121
+ <div>
122
+ <label for="genre" class="block text-sm font-medium text-gray-700 mb-2">Genre</label>
123
+ <select id="genre" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500">
124
+ <option value="pop">Pop</option>
125
+ <option value="rock">Rock</option>
126
+ <option value="electronic">Electronic</option>
127
+ <option value="hiphop">Hip Hop</option>
128
+ <option value="jazz">Jazz</option>
129
+ <option value="classical">Classical</option>
130
+ <option value="custom">Custom</option>
131
+ </select>
132
+ </div>
133
+
134
+ <div>
135
+ <label for="mood" class="block text-sm font-medium text-gray-700 mb-2">Mood</label>
136
+ <select id="mood" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500">
137
+ <option value="happy">Happy</option>
138
+ <option value="energetic">Energetic</option>
139
+ <option value="chill">Chill</option>
140
+ <option value="romantic">Romantic</option>
141
+ <option value="melancholic">Melancholic</option>
142
+ <option value="custom">Custom</option>
143
+ </select>
144
+ </div>
145
+ </div>
146
+
147
+ <div class="mb-6">
148
+ <label for="instruments" class="block text-sm font-medium text-gray-700 mb-2">Instruments (optional)</label>
149
+ <input type="text" id="instruments" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500" placeholder="e.g. piano, electric guitar, synthesizer">
150
+ </div>
151
+
152
+ <div class="flex justify-center">
153
+ <button id="generate-btn" class="bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 rounded-full text-lg font-semibold flex items-center">
154
+ <i class="fas fa-magic mr-2"></i> Generate Music
155
+ </button>
156
+ </div>
157
+ </div>
158
+
159
+ <!-- Voice/Hum Tab Content -->
160
+ <div id="voice-content" class="mt-6 hidden">
161
+ <div class="text-center mb-6">
162
+ <button id="record-btn" class="bg-red-500 hover:bg-red-600 text-white rounded-full h-16 w-16 flex items-center justify-center mx-auto">
163
+ <i class="fas fa-microphone text-xl"></i>
164
+ </button>
165
+ <p id="record-status" class="mt-2 text-sm text-gray-600">Click to record your melody</p>
166
+ </div>
167
+
168
+ <div class="mb-6">
169
+ <label class="block text-sm font-medium text-gray-700 mb-2">Describe what you're humming (optional)</label>
170
+ <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500" placeholder="e.g. A sad violin melody">
171
+ </div>
172
+
173
+ <div class="flex justify-center">
174
+ <button class="bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 rounded-full text-lg font-semibold flex items-center">
175
+ <i class="fas fa-magic mr-2"></i> Generate from Voice
176
+ </button>
177
+ </div>
178
+ </div>
179
+ </div>
180
+ </div>
181
+
182
+ <!-- Generation Progress (Hidden by default) -->
183
+ <div id="progress-section" class="mt-8 bg-white rounded-xl shadow-md overflow-hidden hidden">
184
+ <div class="p-6">
185
+ <h3 class="text-lg font-medium text-gray-900 mb-4">Generating your music...</h3>
186
+
187
+ <div class="progress-bar mb-4">
188
+ <div id="progress-fill" class="progress-fill"></div>
189
+ </div>
190
+
191
+ <div class="flex justify-between text-sm text-gray-600 mb-6">
192
+ <span>0%</span>
193
+ <span id="progress-percent">0%</span>
194
+ <span>100%</span>
195
+ </div>
196
+
197
+ <div class="text-center">
198
+ <p class="text-gray-600">This usually takes about 30-60 seconds. You can leave this page and we'll notify you when it's ready.</p>
199
+ </div>
200
+ </div>
201
+ </div>
202
+
203
+ <!-- Results Section (Hidden by default) -->
204
+ <div id="results-section" class="mt-8 hidden">
205
+ <h3 class="text-xl font-bold text-gray-900 mb-4">Your AI-Generated Music</h3>
206
+
207
+ <div class="grid grid-cols-1 gap-6">
208
+ <!-- Generated Track 1 -->
209
+ <div class="bg-white rounded-xl shadow-sm overflow-hidden hover:shadow-md transition-shadow duration-300">
210
+ <div class="p-4 flex items-center">
211
+ <div class="flex-shrink-0 bg-gray-100 rounded-lg h-16 w-16 flex items-center justify-center">
212
+ <i class="fas fa-music text-gray-500 text-xl"></i>
213
+ </div>
214
+ <div class="ml-4 flex-grow">
215
+ <h4 class="font-medium">Summer Breeze (Version 1)</h4>
216
+ <p class="text-sm text-gray-500">Pop • 2:45</p>
217
+ </div>
218
+ <div class="flex items-center space-x-4">
219
+ <button class="text-purple-600 hover:text-purple-800">
220
+ <i class="fas fa-play-circle text-2xl"></i>
221
+ </button>
222
+ <button class="text-gray-400 hover:text-gray-600">
223
+ <i class="fas fa-download"></i>
224
+ </button>
225
+ </div>
226
+ </div>
227
+ </div>
228
+
229
+ <!-- Generated Track 2 -->
230
+ <div class="bg-white rounded-xl shadow-sm overflow-hidden hover:shadow-md transition-shadow duration-300">
231
+ <div class="p-4 flex items-center">
232
+ <div class="flex-shrink-0 bg-gray-100 rounded-lg h-16 w-16 flex items-center justify-center">
233
+ <i class="fas fa-music text-gray-500 text-xl"></i>
234
+ </div>
235
+ <div class="ml-4 flex-grow">
236
+ <h4 class="font-medium">Summer Breeze (Version 2)</h4>
237
+ <p class="text-sm text-gray-500">Pop • 3:12</p>
238
+ </div>
239
+ <div class="flex items-center space-x-4">
240
+ <button class="text-purple-600 hover:text-purple-800">
241
+ <i class="fas fa-play-circle text-2xl"></i>
242
+ </button>
243
+ <button class="text-gray-400 hover:text-gray-600">
244
+ <i class="fas fa-download"></i>
245
+ </button>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+
251
+ <div class="mt-6 flex justify-between">
252
+ <button class="text-purple-600 hover:text-purple-800 font-medium">
253
+ <i class="fas fa-redo mr-2"></i> Regenerate
254
+ </button>
255
+ <button class="bg-purple-600 hover:bg-purple-700 text-white px-6 py-2 rounded-full text-sm font-medium">
256
+ Save to Library
257
+ </button>
258
+ </div>
259
+ </div>
260
+ </div>
261
+
262
+ <!-- Footer -->
263
+ <footer class="bg-gray-50 mt-12">
264
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
265
+ <div class="border-t border-gray-200 pt-8 flex flex-col md:flex-row justify-between items-center">
266
+ <p class="text-gray-500 text-sm">© 2023 MelodyAI. All rights reserved.</p>
267
+ <div class="mt-4 md:mt-0 flex space-x-6">
268
+ <a href="#" class="text-gray-400 hover:text-gray-500">
269
+ <i class="fab fa-twitter"></i>
270
+ </a>
271
+ <a href="#" class="text-gray-400 hover:text-gray-500">
272
+ <i class="fab fa-instagram"></i>
273
+ </a>
274
+ <a href="#" class="text-gray-400 hover:text-gray-500">
275
+ <i class="fab fa-github"></i>
276
+ </a>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ </footer>
281
+
282
+ <script>
283
+ // Tab switching
284
+ document.getElementById('text-tab').addEventListener('click', function() {
285
+ document.getElementById('text-content').classList.remove('hidden');
286
+ document.getElementById('voice-content').classList.add('hidden');
287
+ this.classList.add('border-purple-500', 'text-purple-600');
288
+ this.classList.remove('border-transparent', 'text-gray-500');
289
+ document.getElementById('voice-tab').classList.add('border-transparent', 'text-gray-500');
290
+ document.getElementById('voice-tab').classList.remove('border-purple-500', 'text-purple-600');
291
+ });
292
+
293
+ document.getElementById('voice-tab').addEventListener('click', function() {
294
+ document.getElementById('voice-content').classList.remove('hidden');
295
+ document.getElementById('text-content').classList.add('hidden');
296
+ this.classList.add('border-purple-500', 'text-purple-600');
297
+ this.classList.remove('border-transparent', 'text-gray-500');
298
+ document.getElementById('text-tab').classList.add('border-transparent', 'text-gray-500');
299
+ document.getElementById('text-tab').classList.remove('border-purple-500', 'text-purple-600');
300
+ });
301
+
302
+ // Record button functionality
303
+ const recordBtn = document.getElementById('record-btn');
304
+ const recordStatus = document.getElementById('record-status');
305
+ let isRecording = false;
306
+
307
+ recordBtn.addEventListener('click', function() {
308
+ isRecording = !isRecording;
309
+
310
+ if (isRecording) {
311
+ this.classList.add('recording');
312
+ recordStatus.textContent = 'Recording... Click to stop';
313
+ } else {
314
+ this.classList.remove('recording');
315
+ recordStatus.textContent = 'Click to record your melody';
316
+ }
317
+ });
318
+
319
+ // Generate button functionality
320
+ document.getElementById('generate-btn').addEventListener('click', function() {
321
+ const prompt = document.getElementById('prompt').value.trim();
322
+
323
+ if (!prompt) {
324
+ alert('Please describe your song before generating');
325
+ return;
326
+ }
327
+
328
+ // Show progress section
329
+ document.getElementById('progress-section').classList.remove('hidden');
330
+
331
+ // Simulate progress
332
+ let progress = 0;
333
+ const progressInterval = setInterval(() => {
334
+ progress += Math.random() * 10;
335
+ if (progress > 100) progress = 100;
336
+
337
+ document.getElementById('progress-fill').style.width = `${progress}%`;
338
+ document.getElementById('progress-percent').textContent = `${Math.floor(progress)}%`;
339
+
340
+ if (progress === 100) {
341
+ clearInterval(progressInterval);
342
+
343
+ // Hide progress, show results after a delay
344
+ setTimeout(() => {
345
+ document.getElementById('progress-section').classList.add('hidden');
346
+ document.getElementById('results-section').classList.remove('hidden');
347
+ }, 500);
348
+ }
349
+ }, 500);
350
+ });
351
+
352
+ // Simulate waveform animation
353
+ function animateWaveforms() {
354
+ document.querySelectorAll('.waveform').forEach(wave => {
355
+ const duration = Math.random() * 1 + 1.5;
356
+ wave.style.animationDuration = `${duration}s`;
357
+ });
358
+ }
359
+
360
+ // Initialize animations
361
+ document.addEventListener('DOMContentLoaded', animateWaveforms);
362
+ </script>
363
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=batnyan/mmmm" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
364
+ </html>