jjin6573 commited on
Commit
7ae2c28
Β·
verified Β·
1 Parent(s): bd8aa67

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +142 -36
README.md CHANGED
@@ -18,7 +18,7 @@ tags:
18
 
19
  6 powerful MCP tools for voice processing, all accepting base64-encoded audio.
20
 
21
- πŸ“’ **Social Post:** [View on X](https://x.com/dahee_pk/status/1994380787601576005)<br>
22
  🎬 **Demo Video:** [Watch on YouTube](https://www.youtube.com/watch?v=1VIqvpwfyWU)<br>
23
  πŸ‘₯ **Team:** [@EricYoun](https://huggingface.co/EricYoun), [@NickEo](https://huggingface.co/NickEo), [@HYENA-WON](https://huggingface.co/HYENA-WON), [@jjin6573](https://huggingface.co/jjin6573), [@cocoajoa](https://huggingface.co/cocoajoa)
24
 
 
18
 
19
  6 powerful MCP tools for voice processing, all accepting base64-encoded audio.
20
 
21
+ πŸ“’ **Social Post:** [View on X](https://x.com/dahee_pk/status/1994389505898582442)<br>
22
  🎬 **Demo Video:** [Watch on YouTube](https://www.youtube.com/watch?v=1VIqvpwfyWU)<br>
23
  πŸ‘₯ **Team:** [@EricYoun](https://huggingface.co/EricYoun), [@NickEo](https://huggingface.co/NickEo), [@HYENA-WON](https://huggingface.co/HYENA-WON), [@jjin6573](https://huggingface.co/jjin6573), [@cocoajoa](https://huggingface.co/cocoajoa)
24
 
app.py CHANGED
@@ -1115,26 +1115,84 @@ def create_similarity_visualization(result):
1115
  # ============================================================================
1116
 
1117
  custom_css = """
1118
- /* ===== DARK THEME STYLING ===== */
1119
- /* Note: Dark mode is forced via JavaScript (force_dark_mode_js) using URL parameter ?__theme=dark */
1120
- /* This CSS provides the visual styling for dark mode */
1121
 
1122
  :root {
1123
  color-scheme: dark !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1124
  }
1125
 
1126
  /* ===== GLOBAL STYLES ===== */
1127
  body {
1128
  background: linear-gradient(180deg, #0a0a1a 0%, #0f0f23 100%) !important;
 
1129
  color: #ffffff !important;
1130
  font-family: system-ui, -apple-system, sans-serif;
1131
  }
1132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1133
  .gradio-container {
1134
  max-width: 100% !important;
1135
  width: 100% !important;
1136
  padding: 0px 16px 20px 16px !important;
1137
- background: transparent !important;
 
1138
  margin: 0 !important;
1139
  }
1140
 
@@ -1344,9 +1402,9 @@ footer,
1344
 
1345
  /* ===== CARD STYLES ===== */
1346
  .card {
1347
- background: rgba(15, 15, 35, 0.8);
1348
- backdrop-filter: blur(20px);
1349
- border: 1px solid rgba(124, 58, 237, 0.3);
1350
  border-radius: 20px;
1351
  padding: 30px;
1352
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
@@ -1357,7 +1415,7 @@ footer,
1357
  }
1358
 
1359
  .card:hover {
1360
- border-color: rgba(124, 58, 237, 0.5);
1361
  box-shadow: 0 12px 48px rgba(124, 58, 237, 0.3);
1362
  }
1363
 
@@ -1532,47 +1590,73 @@ footer,
1532
  }
1533
 
1534
  /* ===== TOOLS TABLE ===== */
1535
- .tools-table {
 
 
 
 
 
1536
  width: 100%;
1537
  border-collapse: separate;
1538
  border-spacing: 0;
1539
- background: rgba(10, 10, 26, 0.6);
 
1540
  border-radius: 12px;
1541
  overflow: hidden;
1542
- border: 1px solid rgba(124, 58, 237, 0.3);
1543
  margin-bottom: 0;
1544
  flex: 1;
 
1545
  }
1546
 
1547
- .tools-table th {
1548
- background: rgba(124, 58, 237, 0.2);
1549
- color: #a5b4fc;
 
 
 
 
 
 
1550
  font-weight: 700;
1551
  font-size: 16px;
1552
  text-transform: uppercase;
1553
  letter-spacing: 1.5px;
1554
  padding: 20px 14px;
1555
  text-align: left;
1556
- border-bottom: 1px solid rgba(124, 58, 237, 0.3);
1557
  }
1558
 
1559
- .tools-table td {
 
 
 
 
 
1560
  padding: 20px 14px;
1561
- color: #cbd5e1;
 
 
1562
  font-size: 16px;
1563
- border-bottom: 1px solid rgba(99, 102, 241, 0.1);
1564
  }
1565
 
1566
  .tools-table tr:last-child td {
1567
  border-bottom: none;
1568
  }
1569
 
1570
- .tools-table tr:hover {
1571
- background: rgba(124, 58, 237, 0.08);
 
 
1572
  }
1573
 
1574
- .tool-name {
1575
- color: #22d3ee;
 
 
 
 
1576
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
1577
  font-weight: 600;
1578
  font-size: 13px;
@@ -1580,24 +1664,38 @@ footer,
1580
  }
1581
 
1582
  /* ===== COMPOSITE SECTION ===== */
1583
- .composite-section {
1584
- background: rgba(10, 10, 26, 0.8);
1585
- border: 1px solid rgba(124, 58, 237, 0.3);
 
 
 
 
 
1586
  border-radius: 12px;
1587
  padding: 20px;
 
1588
  }
1589
 
1590
- .composite-header {
 
 
 
 
1591
  font-size: 11px;
1592
  font-weight: 700;
1593
- color: #a5b4fc;
1594
  text-transform: uppercase;
1595
  letter-spacing: 1.5px;
1596
  margin-bottom: 12px;
1597
  }
1598
 
1599
- .composite-content {
1600
- color: #cbd5e1;
 
 
 
 
1601
  font-size: 12px;
1602
  line-height: 1.6;
1603
  margin-bottom: 16px;
@@ -2064,15 +2162,23 @@ with gr.Blocks() as demo:
2064
  </svg>
2065
  </div>
2066
  <script>
2067
- // Force dark mode on page load
2068
  (function() {{
2069
- const url = new URL(window.location);
2070
- if (url.searchParams.get('__theme') !== 'dark') {{
2071
- url.searchParams.set('__theme', 'dark');
2072
- window.location.href = url.href;
2073
- }}
2074
- document.body.classList.add('dark');
2075
  document.documentElement.setAttribute('data-theme', 'dark');
 
 
 
 
 
 
 
 
 
 
 
 
2076
  }})();
2077
 
2078
  // JavaScript to completely remove upload text from Audio components in demo-row
 
1115
  # ============================================================================
1116
 
1117
  custom_css = """
1118
+ /* ===== DARK THEME STYLING (CSS-ONLY) ===== */
1119
+ /* This CSS forces dark mode appearance regardless of system/Gradio theme */
1120
+ /* All colors are SOLID (not rgba/transparent) to ensure consistent appearance */
1121
 
1122
  :root {
1123
  color-scheme: dark !important;
1124
+ --body-background-fill: #0a0a1a !important;
1125
+ --background-fill-primary: #0d0d1a !important;
1126
+ --background-fill-secondary: #12122a !important;
1127
+ --block-background-fill: #0d0d1a !important;
1128
+ --input-background-fill: #1a1a35 !important;
1129
+ --body-text-color: #e0e7ff !important;
1130
+ --block-title-text-color: #a5b4fc !important;
1131
+ --block-label-text-color: #a5b4fc !important;
1132
+ --input-text-color: #e0e7ff !important;
1133
+ --neutral-50: #0a0a1a !important;
1134
+ --neutral-100: #0d0d1a !important;
1135
+ --neutral-200: #12122a !important;
1136
+ --neutral-300: #1a1a35 !important;
1137
+ --neutral-400: #2d2d4a !important;
1138
+ --neutral-500: #4a4a6a !important;
1139
+ --neutral-600: #7c7c9a !important;
1140
+ --neutral-700: #a5b4fc !important;
1141
+ --neutral-800: #c7d2fe !important;
1142
+ --neutral-900: #e0e7ff !important;
1143
+ --neutral-950: #ffffff !important;
1144
+ }
1145
+
1146
+ /* Force dark mode on html and body */
1147
+ html, body {
1148
+ background: #0a0a1a !important;
1149
+ background-color: #0a0a1a !important;
1150
+ color: #e0e7ff !important;
1151
  }
1152
 
1153
  /* ===== GLOBAL STYLES ===== */
1154
  body {
1155
  background: linear-gradient(180deg, #0a0a1a 0%, #0f0f23 100%) !important;
1156
+ background-color: #0a0a1a !important;
1157
  color: #ffffff !important;
1158
  font-family: system-ui, -apple-system, sans-serif;
1159
  }
1160
 
1161
+ /* Override Gradio's light mode backgrounds AND text colors */
1162
+ .dark, .light, [data-theme="light"], [data-theme="dark"],
1163
+ html[data-theme="light"], html[data-theme="dark"],
1164
+ body.light, body.dark {
1165
+ --body-background-fill: #0a0a1a !important;
1166
+ --background-fill-primary: #0d0d1a !important;
1167
+ --background-fill-secondary: #12122a !important;
1168
+ --block-background-fill: #0d0d1a !important;
1169
+ --input-background-fill: #1a1a35 !important;
1170
+ --body-text-color: #e0e7ff !important;
1171
+ --block-title-text-color: #a5b4fc !important;
1172
+ --block-label-text-color: #a5b4fc !important;
1173
+ --input-text-color: #e0e7ff !important;
1174
+ --neutral-50: #0a0a1a !important;
1175
+ --neutral-100: #0d0d1a !important;
1176
+ --neutral-200: #12122a !important;
1177
+ --neutral-300: #1a1a35 !important;
1178
+ --neutral-400: #2d2d4a !important;
1179
+ --neutral-500: #4a4a6a !important;
1180
+ --neutral-600: #7c7c9a !important;
1181
+ --neutral-700: #a5b4fc !important;
1182
+ --neutral-800: #c7d2fe !important;
1183
+ --neutral-900: #e0e7ff !important;
1184
+ --neutral-950: #ffffff !important;
1185
+ color: #e0e7ff !important;
1186
+ background: #0a0a1a !important;
1187
+ background-color: #0a0a1a !important;
1188
+ }
1189
+
1190
  .gradio-container {
1191
  max-width: 100% !important;
1192
  width: 100% !important;
1193
  padding: 0px 16px 20px 16px !important;
1194
+ background: #0a0a1a !important;
1195
+ background-color: #0a0a1a !important;
1196
  margin: 0 !important;
1197
  }
1198
 
 
1402
 
1403
  /* ===== CARD STYLES ===== */
1404
  .card {
1405
+ background: #0f0f23 !important;
1406
+ background-color: #0f0f23 !important;
1407
+ border: 1px solid #3d2a6b !important;
1408
  border-radius: 20px;
1409
  padding: 30px;
1410
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
 
1415
  }
1416
 
1417
  .card:hover {
1418
+ border-color: #5b3d99 !important;
1419
  box-shadow: 0 12px 48px rgba(124, 58, 237, 0.3);
1420
  }
1421
 
 
1590
  }
1591
 
1592
  /* ===== TOOLS TABLE ===== */
1593
+ .tools-table,
1594
+ table.tools-table,
1595
+ .light .tools-table,
1596
+ .dark .tools-table,
1597
+ [data-theme="light"] .tools-table,
1598
+ [data-theme="dark"] .tools-table {
1599
  width: 100%;
1600
  border-collapse: separate;
1601
  border-spacing: 0;
1602
+ background: #0d0d1f !important;
1603
+ background-color: #0d0d1f !important;
1604
  border-radius: 12px;
1605
  overflow: hidden;
1606
+ border: 1px solid #3d2a6b !important;
1607
  margin-bottom: 0;
1608
  flex: 1;
1609
+ color: #cbd5e1 !important;
1610
  }
1611
 
1612
+ .tools-table th,
1613
+ table.tools-table th,
1614
+ .light .tools-table th,
1615
+ .dark .tools-table th,
1616
+ [data-theme="light"] .tools-table th,
1617
+ [data-theme="dark"] .tools-table th {
1618
+ background: #1f1545 !important;
1619
+ background-color: #1f1545 !important;
1620
+ color: #a5b4fc !important;
1621
  font-weight: 700;
1622
  font-size: 16px;
1623
  text-transform: uppercase;
1624
  letter-spacing: 1.5px;
1625
  padding: 20px 14px;
1626
  text-align: left;
1627
+ border-bottom: 1px solid #3d2a6b !important;
1628
  }
1629
 
1630
+ .tools-table td,
1631
+ table.tools-table td,
1632
+ .light .tools-table td,
1633
+ .dark .tools-table td,
1634
+ [data-theme="light"] .tools-table td,
1635
+ [data-theme="dark"] .tools-table td {
1636
  padding: 20px 14px;
1637
+ color: #cbd5e1 !important;
1638
+ background: #0d0d1f !important;
1639
+ background-color: #0d0d1f !important;
1640
  font-size: 16px;
1641
+ border-bottom: 1px solid #1a1535 !important;
1642
  }
1643
 
1644
  .tools-table tr:last-child td {
1645
  border-bottom: none;
1646
  }
1647
 
1648
+ .tools-table tr:hover,
1649
+ .tools-table tr:hover td {
1650
+ background: #1a1540 !important;
1651
+ background-color: #1a1540 !important;
1652
  }
1653
 
1654
+ .tool-name,
1655
+ .light .tool-name,
1656
+ .dark .tool-name,
1657
+ [data-theme="light"] .tool-name,
1658
+ [data-theme="dark"] .tool-name {
1659
+ color: #22d3ee !important;
1660
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
1661
  font-weight: 600;
1662
  font-size: 13px;
 
1664
  }
1665
 
1666
  /* ===== COMPOSITE SECTION ===== */
1667
+ .composite-section,
1668
+ .light .composite-section,
1669
+ .dark .composite-section,
1670
+ [data-theme="light"] .composite-section,
1671
+ [data-theme="dark"] .composite-section {
1672
+ background: #0d0d1f !important;
1673
+ background-color: #0d0d1f !important;
1674
+ border: 1px solid #3d2a6b !important;
1675
  border-radius: 12px;
1676
  padding: 20px;
1677
+ color: #cbd5e1 !important;
1678
  }
1679
 
1680
+ .composite-header,
1681
+ .light .composite-header,
1682
+ .dark .composite-header,
1683
+ [data-theme="light"] .composite-header,
1684
+ [data-theme="dark"] .composite-header {
1685
  font-size: 11px;
1686
  font-weight: 700;
1687
+ color: #a5b4fc !important;
1688
  text-transform: uppercase;
1689
  letter-spacing: 1.5px;
1690
  margin-bottom: 12px;
1691
  }
1692
 
1693
+ .composite-content,
1694
+ .light .composite-content,
1695
+ .dark .composite-content,
1696
+ [data-theme="light"] .composite-content,
1697
+ [data-theme="dark"] .composite-content {
1698
+ color: #cbd5e1 !important;
1699
  font-size: 12px;
1700
  line-height: 1.6;
1701
  margin-bottom: 16px;
 
2162
  </svg>
2163
  </div>
2164
  <script>
2165
+ // Force dark mode styling (no redirect, just add classes)
2166
  (function() {{
2167
+ // Add dark mode classes immediately
2168
+ document.documentElement.classList.add('dark');
 
 
 
 
2169
  document.documentElement.setAttribute('data-theme', 'dark');
2170
+ document.body.classList.add('dark');
2171
+ document.body.setAttribute('data-theme', 'dark');
2172
+
2173
+ // Also observe for Gradio container and add dark class there
2174
+ const observer = new MutationObserver(function(mutations) {{
2175
+ const container = document.querySelector('.gradio-container');
2176
+ if (container && !container.classList.contains('dark')) {{
2177
+ container.classList.add('dark');
2178
+ container.setAttribute('data-theme', 'dark');
2179
+ }}
2180
+ }});
2181
+ observer.observe(document.body, {{ childList: true, subtree: true }});
2182
  }})();
2183
 
2184
  // JavaScript to completely remove upload text from Audio components in demo-row