Boopster commited on
Commit
a17e77e
·
1 Parent(s): abdc0fe

feat: Redesign the user interface with a modern aesthetic, enhanced styling, and updated project metadata.

Browse files
.gitignore CHANGED
@@ -7,4 +7,6 @@ __pycache__/
7
 
8
  .pytest_cache
9
 
10
- venv
 
 
 
7
 
8
  .pytest_cache
9
 
10
+ venv
11
+
12
+ build
README.md CHANGED
@@ -1,13 +1,17 @@
1
  ---
2
  title: Reachy Mini DanceML
3
  emoji: 🔄
4
- colorFrom: purple
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
8
- short_description: Write your description here
9
  tags:
 
10
  - reachy_mini_python_app
 
 
 
11
  ---
12
 
13
  # Reachy Mini DanceML
 
1
  ---
2
  title: Reachy Mini DanceML
3
  emoji: 🔄
4
+ colorFrom: indigo
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ short_description: Voice-controlled movement SDK for Reachy Mini robot.
9
  tags:
10
+ - reachy_mini
11
  - reachy_mini_python_app
12
+ - voice_control
13
+ - movement_control
14
+ - choreography
15
  ---
16
 
17
  # Reachy Mini DanceML
pyproject.toml CHANGED
@@ -13,7 +13,7 @@ dependencies = [
13
  "reachy-mini",
14
  "fastrtc[vad]>=0.0.16",
15
  "openai>=1.0.0",
16
- "gradio>=4.0.0",
17
  "scipy>=1.10.0",
18
  "sounddevice>=0.4.6",
19
  ]
 
13
  "reachy-mini",
14
  "fastrtc[vad]>=0.0.16",
15
  "openai>=1.0.0",
16
+ "gradio>=5.0.0",
17
  "scipy>=1.10.0",
18
  "sounddevice>=0.4.6",
19
  ]
reachy_mini_danceml/main.py CHANGED
@@ -166,37 +166,35 @@ class ReachyMiniDanceml(ReachyMiniApp):
166
  }
167
 
168
  .gradio-container {
169
- background-color: #F3F4F6 !important;
170
- background-image:
171
- radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
172
- radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%) !important;
173
  }
174
 
175
  .main-card {
176
- background: white !important;
 
 
177
  border-radius: 24px !important;
178
  box-shadow:
179
- 0 4px 6px -1px rgba(0, 0, 0, 0.05),
180
- 0 10px 15px -3px rgba(0, 0, 0, 0.05) !important;
181
- border: 1px solid rgba(229, 231, 235, 0.5) !important;
182
  max-width: 800px !important;
183
  margin: 2rem auto !important;
184
  padding: 40px !important;
185
  }
186
 
187
  .header-title {
188
- color: #111827;
189
  text-align: center;
190
  font-size: 2.5rem !important;
191
  font-weight: 700 !important;
192
  margin-bottom: 0.5rem !important;
193
- background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
194
- -webkit-background-clip: text;
195
- -webkit-text-fill-color: transparent;
196
  }
197
 
198
  .header-subtitle {
199
- color: #6B7280;
200
  text-align: center;
201
  font-size: 1.1rem !important;
202
  margin-bottom: 0.5rem !important;
@@ -204,8 +202,9 @@ class ReachyMiniDanceml(ReachyMiniApp):
204
 
205
  /* Status Box */
206
  .status-box {
207
- background: #F8FAFC !important;
208
- border: 1px solid #E2E8F0 !important;
 
209
  border-radius: 16px !important;
210
  padding: 1.5rem !important;
211
  text-align: center;
@@ -213,15 +212,15 @@ class ReachyMiniDanceml(ReachyMiniApp):
213
  }
214
 
215
  .status-box.active {
216
- background: #EFF6FF !important;
217
- border-color: #60A5FA !important;
218
- box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1) !important;
219
  }
220
 
221
  .status-text {
222
  font-size: 1.25rem !important;
223
  font-weight: 500 !important;
224
- color: #334155 !important;
225
  }
226
 
227
  /* Wave Animation */
@@ -270,10 +269,33 @@ class ReachyMiniDanceml(ReachyMiniApp):
270
  }
271
 
272
  .tip-card {
273
- background: #F9FAFB;
274
- padding: 1rem;
275
- border-radius: 12px;
276
- border: 1px solid #F3F4F6;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  }
278
 
279
  /* Button Styling */
@@ -299,23 +321,32 @@ class ReachyMiniDanceml(ReachyMiniApp):
299
 
300
  .footer-tip {
301
  text-align: center;
302
- color: #9CA3AF;
303
  margin-top: 2rem;
304
  font-size: 0.9rem;
305
  }
306
 
307
  /* Activity Feed */
308
  .activity-feed {
309
- background: #F8FAFC;
310
- border: 1px solid #E2E8F0;
311
- border-radius: 12px;
312
- padding: 1rem;
313
  margin-top: 1rem;
314
  min-height: 200px;
315
  max-height: 400px;
316
  overflow-y: auto;
317
  font-family: 'Monaco', 'Menlo', monospace;
318
  font-size: 0.85rem;
 
 
 
 
 
 
 
 
 
319
  }
320
 
321
  .move-item {
@@ -323,7 +354,8 @@ class ReachyMiniDanceml(ReachyMiniApp):
323
  align-items: center;
324
  gap: 8px;
325
  padding: 6px 0;
326
- border-bottom: 1px solid #E2E8F0;
 
327
  }
328
 
329
  .move-item:last-child {
@@ -383,12 +415,11 @@ class ReachyMiniDanceml(ReachyMiniApp):
383
  label=None
384
  )
385
 
386
- # Instructions
387
  with gr.Row():
388
  gr.HTML("""
389
  <div class="instruction-grid">
390
  <div class="tip-card">
391
- <h3 style="margin-top:0">🎯 Commands</h3>
392
  <ul style="padding-left:1.5rem; margin-bottom:0">
393
  <li>"Look up/down/left/right"</li>
394
  <li>"Nod your head"</li>
@@ -396,7 +427,7 @@ class ReachyMiniDanceml(ReachyMiniApp):
396
  </ul>
397
  </div>
398
  <div class="tip-card">
399
- <h3 style="margin-top:0">🎭 Fun</h3>
400
  <ul style="padding-left:1.5rem; margin-bottom:0">
401
  <li>"Do a happy dance"</li>
402
  <li>"Show me surprise"</li>
@@ -423,7 +454,7 @@ class ReachyMiniDanceml(ReachyMiniApp):
423
  move_activity = gr.HTML(
424
  """
425
  <div class="activity-feed">
426
- <h3 style="margin:0 0 0.5rem 0; font-size:1rem; color:#64748B">📋 Recent Movements</h3>
427
  <div id="move-list" style="font-size:0.9rem; color:#64748B">
428
  <em>Waiting for commands...</em>
429
  </div>
@@ -464,7 +495,7 @@ class ReachyMiniDanceml(ReachyMiniApp):
464
  if not move_history:
465
  return """
466
  <div class="activity-feed">
467
- <h3 style="margin:0 0 0.5rem 0; font-size:1rem; color:#64748B">📋 Recent Movements</h3>
468
  <div id="move-list" style="font-size:0.9rem; color:#64748B">
469
  <em>Waiting for commands...</em>
470
  </div>
@@ -493,7 +524,7 @@ class ReachyMiniDanceml(ReachyMiniApp):
493
 
494
  return f"""
495
  <div class="activity-feed">
496
- <h3 style="margin:0 0 0.5rem 0; font-size:1rem; color:#64748B">📋 Recent Movements</h3>
497
  <div id="move-list">{items_html}</div>
498
  </div>
499
  """
 
166
  }
167
 
168
  .gradio-container {
169
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
170
+ min-height: 100vh;
 
 
171
  }
172
 
173
  .main-card {
174
+ background: rgba(255, 255, 255, 0.15) !important;
175
+ backdrop-filter: blur(20px) !important;
176
+ -webkit-backdrop-filter: blur(20px) !important;
177
  border-radius: 24px !important;
178
  box-shadow:
179
+ 0 8px 32px rgba(0, 0, 0, 0.1),
180
+ inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
181
+ border: 1px solid rgba(255, 255, 255, 0.2) !important;
182
  max-width: 800px !important;
183
  margin: 2rem auto !important;
184
  padding: 40px !important;
185
  }
186
 
187
  .header-title {
188
+ color: white;
189
  text-align: center;
190
  font-size: 2.5rem !important;
191
  font-weight: 700 !important;
192
  margin-bottom: 0.5rem !important;
193
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
 
 
194
  }
195
 
196
  .header-subtitle {
197
+ color: rgba(255, 255, 255, 0.9);
198
  text-align: center;
199
  font-size: 1.1rem !important;
200
  margin-bottom: 0.5rem !important;
 
202
 
203
  /* Status Box */
204
  .status-box {
205
+ background: rgba(255, 255, 255, 0.2) !important;
206
+ backdrop-filter: blur(10px) !important;
207
+ border: 1px solid rgba(255, 255, 255, 0.3) !important;
208
  border-radius: 16px !important;
209
  padding: 1.5rem !important;
210
  text-align: center;
 
212
  }
213
 
214
  .status-box.active {
215
+ background: rgba(96, 165, 250, 0.3) !important;
216
+ border-color: rgba(96, 165, 250, 0.5) !important;
217
+ box-shadow: 0 0 20px rgba(96, 165, 250, 0.3) !important;
218
  }
219
 
220
  .status-text {
221
  font-size: 1.25rem !important;
222
  font-weight: 500 !important;
223
+ color: white !important;
224
  }
225
 
226
  /* Wave Animation */
 
269
  }
270
 
271
  .tip-card {
272
+ background: white;
273
+ padding: 1.25rem;
274
+ border-radius: 16px;
275
+ border: none;
276
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
277
+ }
278
+
279
+ .tip-card h3 {
280
+ color: #1e293b !important;
281
+ display: flex;
282
+ align-items: center;
283
+ gap: 0.5rem;
284
+ }
285
+
286
+ .tip-card li {
287
+ color: #64748b !important;
288
+ }
289
+
290
+ .emoji-icon {
291
+ display: inline-flex;
292
+ align-items: center;
293
+ justify-content: center;
294
+ width: 2.5rem;
295
+ height: 2.5rem;
296
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
297
+ border-radius: 10px;
298
+ font-size: 1.25rem;
299
  }
300
 
301
  /* Button Styling */
 
321
 
322
  .footer-tip {
323
  text-align: center;
324
+ color: rgba(255, 255, 255, 0.8);
325
  margin-top: 2rem;
326
  font-size: 0.9rem;
327
  }
328
 
329
  /* Activity Feed */
330
  .activity-feed {
331
+ background: white;
332
+ border: none;
333
+ border-radius: 16px;
334
+ padding: 1.25rem;
335
  margin-top: 1rem;
336
  min-height: 200px;
337
  max-height: 400px;
338
  overflow-y: auto;
339
  font-family: 'Monaco', 'Menlo', monospace;
340
  font-size: 0.85rem;
341
+ color: #334155;
342
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
343
+ }
344
+
345
+ .activity-feed h3 {
346
+ color: #1e293b !important;
347
+ display: flex;
348
+ align-items: center;
349
+ gap: 0.5rem;
350
  }
351
 
352
  .move-item {
 
354
  align-items: center;
355
  gap: 8px;
356
  padding: 6px 0;
357
+ border-bottom: 1px solid #f1f5f9;
358
+ color: #334155;
359
  }
360
 
361
  .move-item:last-child {
 
415
  label=None
416
  )
417
 
 
418
  with gr.Row():
419
  gr.HTML("""
420
  <div class="instruction-grid">
421
  <div class="tip-card">
422
+ <h3 style="margin-top:0"><span class="emoji-icon">🎯</span> Commands</h3>
423
  <ul style="padding-left:1.5rem; margin-bottom:0">
424
  <li>"Look up/down/left/right"</li>
425
  <li>"Nod your head"</li>
 
427
  </ul>
428
  </div>
429
  <div class="tip-card">
430
+ <h3 style="margin-top:0"><span class="emoji-icon">🎭</span> Fun</h3>
431
  <ul style="padding-left:1.5rem; margin-bottom:0">
432
  <li>"Do a happy dance"</li>
433
  <li>"Show me surprise"</li>
 
454
  move_activity = gr.HTML(
455
  """
456
  <div class="activity-feed">
457
+ <h3 style="margin:0 0 0.5rem 0; font-size:1rem;"><span class="emoji-icon">📋</span> Recent Movements</h3>
458
  <div id="move-list" style="font-size:0.9rem; color:#64748B">
459
  <em>Waiting for commands...</em>
460
  </div>
 
495
  if not move_history:
496
  return """
497
  <div class="activity-feed">
498
+ <h3 style="margin:0 0 0.5rem 0; font-size:1rem;"><span class="emoji-icon">📋</span> Recent Movements</h3>
499
  <div id="move-list" style="font-size:0.9rem; color:#64748B">
500
  <em>Waiting for commands...</em>
501
  </div>
 
524
 
525
  return f"""
526
  <div class="activity-feed">
527
+ <h3 style="margin:0 0 0.5rem 0; font-size:1rem;"><span class="emoji-icon">📋</span> Recent Movements</h3>
528
  <div id="move-list">{items_html}</div>
529
  </div>
530
  """
reachy_mini_danceml/static/index.html CHANGED
@@ -3,24 +3,46 @@
3
 
4
  <head>
5
  <meta charset="UTF-8">
6
- <title>Reachy Mini example app template</title>
7
  <meta name="viewport" content="width=device-width, initial-scale=1">
8
  <link rel="stylesheet" href="/static/style.css">
9
  </head>
10
 
11
  <body>
12
- <h1>Reachy Mini – Control Panel</h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- <div id="controls">
15
- <label style="display:flex; align-items:center; gap:8px;">
16
- <input type="checkbox" id="antenna-checkbox" checked>
17
- Antennas
18
- </label>
 
19
 
20
- <button id="sound-btn">Play Sound</button>
 
 
 
 
21
  </div>
22
 
23
- <div id="status">Antennas status: running</div>
24
  <script src="/static/main.js"></script>
25
  </body>
26
 
 
3
 
4
  <head>
5
  <meta charset="UTF-8">
6
+ <title>Reachy Mini Danceml</title>
7
  <meta name="viewport" content="width=device-width, initial-scale=1">
8
  <link rel="stylesheet" href="/static/style.css">
9
  </head>
10
 
11
  <body>
12
+ <div class="hero">
13
+ <div class="hero-content">
14
+ <div class="app-icon">🤖⚡</div>
15
+ <h1>Reachy Mini Danceml</h1>
16
+ <p class="tagline">Voice Assisted Realtime Dance Composition</p>
17
+ </div>
18
+ </div>
19
+
20
+ <div class="container">
21
+ <div class="control-card">
22
+ <h2>Control Panel</h2>
23
+
24
+ <div id="controls">
25
+ <div class="control-item">
26
+ <label>
27
+ <input type="checkbox" id="antenna-checkbox" checked>
28
+ Antennas
29
+ </label>
30
+ </div>
31
 
32
+ <button id="sound-btn">🔊 Play Sound</button>
33
+ </div>
34
+
35
+ <div id="status">Antennas status: running</div>
36
+ </div>
37
+ </div>
38
 
39
+ <div class="footer">
40
+ <p>
41
+ 🤖 Reachy Mini Danceml •
42
+ <a href="https://github.com/pollen-robotics" target="_blank">Pollen Robotics</a>
43
+ </p>
44
  </div>
45
 
 
46
  <script src="/static/main.js"></script>
47
  </body>
48
 
reachy_mini_danceml/static/style.css CHANGED
@@ -1,25 +1,176 @@
 
 
 
 
 
 
1
  body {
2
- font-family: sans-serif;
3
- margin: 24px;
 
 
 
4
  }
5
 
6
- #sound-btn {
7
- padding: 10px 20px;
8
- border: none;
9
  color: white;
10
- cursor: pointer;
11
- font-size: 16px;
12
- border-radius: 6px;
13
- background-color: #3498db;
14
  }
15
 
16
- #status {
17
- margin-top: 16px;
18
- font-weight: bold;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
 
21
  #controls {
22
  display: flex;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  align-items: center;
24
- gap: 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
 
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
  body {
8
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
9
+ line-height: 1.6;
10
+ color: #333;
11
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
12
+ min-height: 100vh;
13
  }
14
 
15
+ .hero {
16
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 
17
  color: white;
18
+ padding: 3rem 2rem;
19
+ text-align: center;
 
 
20
  }
21
 
22
+ .hero-content {
23
+ max-width: 800px;
24
+ margin: 0 auto;
25
+ }
26
+
27
+ .app-icon {
28
+ font-size: 3rem;
29
+ margin-bottom: 0.5rem;
30
+ display: inline-block;
31
+ }
32
+
33
+ .hero h1 {
34
+ font-size: 2.5rem;
35
+ font-weight: 700;
36
+ margin-bottom: 0.5rem;
37
+ background: linear-gradient(45deg, #fff, #f0f9ff);
38
+ background-clip: text;
39
+ -webkit-background-clip: text;
40
+ -webkit-text-fill-color: transparent;
41
+ }
42
+
43
+ .tagline {
44
+ font-size: 1.1rem;
45
+ opacity: 0.9;
46
+ max-width: 600px;
47
+ margin: 0 auto;
48
+ }
49
+
50
+ .container {
51
+ max-width: 800px;
52
+ margin: 0 auto;
53
+ padding: 2rem;
54
+ }
55
+
56
+ .control-card {
57
+ background: white;
58
+ border-radius: 20px;
59
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
60
+ padding: 2rem;
61
+ margin-bottom: 2rem;
62
+ }
63
+
64
+ .control-card h2 {
65
+ font-size: 1.5rem;
66
+ color: #1e293b;
67
+ margin-bottom: 1.5rem;
68
+ text-align: center;
69
  }
70
 
71
  #controls {
72
  display: flex;
73
+ flex-wrap: wrap;
74
+ align-items: center;
75
+ justify-content: center;
76
+ gap: 1.5rem;
77
+ margin-bottom: 1.5rem;
78
+ }
79
+
80
+ .control-item {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: 0.5rem;
84
+ background: #f0f9ff;
85
+ padding: 0.75rem 1.25rem;
86
+ border-radius: 12px;
87
+ border: 2px solid #e0f2fe;
88
+ }
89
+
90
+ .control-item label {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 0.5rem;
94
+ color: #0c4a6e;
95
+ font-weight: 600;
96
+ cursor: pointer;
97
+ }
98
+
99
+ .control-item input[type="checkbox"] {
100
+ width: 1.25rem;
101
+ height: 1.25rem;
102
+ accent-color: #667eea;
103
+ }
104
+
105
+ #sound-btn {
106
+ background: linear-gradient(135deg, #667eea, #764ba2);
107
+ color: white;
108
+ border: none;
109
+ padding: 0.875rem 2rem;
110
+ border-radius: 12px;
111
+ font-size: 1rem;
112
+ font-weight: 600;
113
+ cursor: pointer;
114
+ transition: all 0.3s ease;
115
+ display: inline-flex;
116
  align-items: center;
117
+ gap: 0.5rem;
118
+ box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
119
+ }
120
+
121
+ #sound-btn:hover {
122
+ transform: translateY(-2px);
123
+ box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
124
+ }
125
+
126
+ #status {
127
+ text-align: center;
128
+ padding: 1rem;
129
+ background: #dcfce7;
130
+ color: #166534;
131
+ border-radius: 8px;
132
+ font-weight: 600;
133
+ border: 1px solid #bbf7d0;
134
+ }
135
+
136
+ #status.error {
137
+ background: #fef2f2;
138
+ color: #dc2626;
139
+ border-color: #fecaca;
140
+ }
141
+
142
+ .footer {
143
+ text-align: center;
144
+ padding: 2rem;
145
+ color: white;
146
+ opacity: 0.8;
147
+ }
148
+
149
+ .footer a {
150
+ color: white;
151
+ text-decoration: none;
152
+ font-weight: 600;
153
+ }
154
+
155
+ .footer a:hover {
156
+ text-decoration: underline;
157
+ }
158
+
159
+ /* Responsive Design */
160
+ @media (max-width: 768px) {
161
+ .hero {
162
+ padding: 2rem 1rem;
163
+ }
164
+
165
+ .hero h1 {
166
+ font-size: 1.75rem;
167
+ }
168
+
169
+ .container {
170
+ padding: 1rem;
171
+ }
172
+
173
+ #controls {
174
+ flex-direction: column;
175
+ }
176
  }