ngxson HF staff commited on
Commit
3a7868c
·
1 Parent(s): 9f97307

try iframe

Browse files
Files changed (4) hide show
  1. app.py +4 -12
  2. front/package-lock.json +18 -59
  3. front/package.json +2 -1
  4. front/vite.config.ts +2 -1
app.py CHANGED
@@ -157,23 +157,15 @@ API_NAME = 'tts'
157
 
158
  head = f'''
159
  <script>
160
- window.SPACE_ID = '{SPACE_ID}';
161
  if (!localStorage.getItem('debug')) {{
162
- document.querySelector('body').classList = [];
163
- const rootDiv = document.createElement('div');
164
- rootDiv.id = 'root';
165
- document.body.appendChild(rootDiv);
166
  }}
167
  </script>
168
  '''
169
 
170
- with open('./front/dist/index.html', 'r') as f:
171
- html = f.read()
172
- lines = html.split('\n')
173
- for i, line in enumerate(lines):
174
- if '<script' in line or 'stylesheet' in line:
175
- head += '\n'.join(lines[:i])
176
-
177
  with gr.Blocks(head=head) as app:
178
  with gr.Row():
179
  with gr.Column():
 
157
 
158
  head = f'''
159
  <script>
 
160
  if (!localStorage.getItem('debug')) {{
161
+ const frontendApp = document.createElement('iframe');
162
+ frontendApp.src = '/gradio_api/file=./front/dist/index.html';
163
+ frontendApp.style = 'position: fixed; top: 0; left: 0; width: 100%; height: 100%; border: none; z-index: 999999;';
164
+ document.body.appendChild(frontendApp);
165
  }}
166
  </script>
167
  '''
168
 
 
 
 
 
 
 
 
169
  with gr.Blocks(head=head) as app:
170
  with gr.Row():
171
  with gr.Column():
front/package-lock.json CHANGED
@@ -10,7 +10,8 @@
10
  "dependencies": {
11
  "@gradio/client": "^1.12.0",
12
  "react": "^19.0.0",
13
- "react-dom": "^19.0.0"
 
14
  },
15
  "devDependencies": {
16
  "@eslint/js": "^9.19.0",
@@ -357,7 +358,6 @@
357
  "cpu": [
358
  "ppc64"
359
  ],
360
- "dev": true,
361
  "license": "MIT",
362
  "optional": true,
363
  "os": [
@@ -374,7 +374,6 @@
374
  "cpu": [
375
  "arm"
376
  ],
377
- "dev": true,
378
  "license": "MIT",
379
  "optional": true,
380
  "os": [
@@ -391,7 +390,6 @@
391
  "cpu": [
392
  "arm64"
393
  ],
394
- "dev": true,
395
  "license": "MIT",
396
  "optional": true,
397
  "os": [
@@ -408,7 +406,6 @@
408
  "cpu": [
409
  "x64"
410
  ],
411
- "dev": true,
412
  "license": "MIT",
413
  "optional": true,
414
  "os": [
@@ -425,7 +422,6 @@
425
  "cpu": [
426
  "arm64"
427
  ],
428
- "dev": true,
429
  "license": "MIT",
430
  "optional": true,
431
  "os": [
@@ -442,7 +438,6 @@
442
  "cpu": [
443
  "x64"
444
  ],
445
- "dev": true,
446
  "license": "MIT",
447
  "optional": true,
448
  "os": [
@@ -459,7 +454,6 @@
459
  "cpu": [
460
  "arm64"
461
  ],
462
- "dev": true,
463
  "license": "MIT",
464
  "optional": true,
465
  "os": [
@@ -476,7 +470,6 @@
476
  "cpu": [
477
  "x64"
478
  ],
479
- "dev": true,
480
  "license": "MIT",
481
  "optional": true,
482
  "os": [
@@ -493,7 +486,6 @@
493
  "cpu": [
494
  "arm"
495
  ],
496
- "dev": true,
497
  "license": "MIT",
498
  "optional": true,
499
  "os": [
@@ -510,7 +502,6 @@
510
  "cpu": [
511
  "arm64"
512
  ],
513
- "dev": true,
514
  "license": "MIT",
515
  "optional": true,
516
  "os": [
@@ -527,7 +518,6 @@
527
  "cpu": [
528
  "ia32"
529
  ],
530
- "dev": true,
531
  "license": "MIT",
532
  "optional": true,
533
  "os": [
@@ -544,7 +534,6 @@
544
  "cpu": [
545
  "loong64"
546
  ],
547
- "dev": true,
548
  "license": "MIT",
549
  "optional": true,
550
  "os": [
@@ -561,7 +550,6 @@
561
  "cpu": [
562
  "mips64el"
563
  ],
564
- "dev": true,
565
  "license": "MIT",
566
  "optional": true,
567
  "os": [
@@ -578,7 +566,6 @@
578
  "cpu": [
579
  "ppc64"
580
  ],
581
- "dev": true,
582
  "license": "MIT",
583
  "optional": true,
584
  "os": [
@@ -595,7 +582,6 @@
595
  "cpu": [
596
  "riscv64"
597
  ],
598
- "dev": true,
599
  "license": "MIT",
600
  "optional": true,
601
  "os": [
@@ -612,7 +598,6 @@
612
  "cpu": [
613
  "s390x"
614
  ],
615
- "dev": true,
616
  "license": "MIT",
617
  "optional": true,
618
  "os": [
@@ -629,7 +614,6 @@
629
  "cpu": [
630
  "x64"
631
  ],
632
- "dev": true,
633
  "license": "MIT",
634
  "optional": true,
635
  "os": [
@@ -646,7 +630,6 @@
646
  "cpu": [
647
  "arm64"
648
  ],
649
- "dev": true,
650
  "license": "MIT",
651
  "optional": true,
652
  "os": [
@@ -663,7 +646,6 @@
663
  "cpu": [
664
  "x64"
665
  ],
666
- "dev": true,
667
  "license": "MIT",
668
  "optional": true,
669
  "os": [
@@ -680,7 +662,6 @@
680
  "cpu": [
681
  "arm64"
682
  ],
683
- "dev": true,
684
  "license": "MIT",
685
  "optional": true,
686
  "os": [
@@ -697,7 +678,6 @@
697
  "cpu": [
698
  "x64"
699
  ],
700
- "dev": true,
701
  "license": "MIT",
702
  "optional": true,
703
  "os": [
@@ -714,7 +694,6 @@
714
  "cpu": [
715
  "x64"
716
  ],
717
- "dev": true,
718
  "license": "MIT",
719
  "optional": true,
720
  "os": [
@@ -731,7 +710,6 @@
731
  "cpu": [
732
  "arm64"
733
  ],
734
- "dev": true,
735
  "license": "MIT",
736
  "optional": true,
737
  "os": [
@@ -748,7 +726,6 @@
748
  "cpu": [
749
  "ia32"
750
  ],
751
- "dev": true,
752
  "license": "MIT",
753
  "optional": true,
754
  "os": [
@@ -765,7 +742,6 @@
765
  "cpu": [
766
  "x64"
767
  ],
768
- "dev": true,
769
  "license": "MIT",
770
  "optional": true,
771
  "os": [
@@ -1226,7 +1202,6 @@
1226
  "cpu": [
1227
  "arm"
1228
  ],
1229
- "dev": true,
1230
  "license": "MIT",
1231
  "optional": true,
1232
  "os": [
@@ -1240,7 +1215,6 @@
1240
  "cpu": [
1241
  "arm64"
1242
  ],
1243
- "dev": true,
1244
  "license": "MIT",
1245
  "optional": true,
1246
  "os": [
@@ -1254,7 +1228,6 @@
1254
  "cpu": [
1255
  "arm64"
1256
  ],
1257
- "dev": true,
1258
  "license": "MIT",
1259
  "optional": true,
1260
  "os": [
@@ -1268,7 +1241,6 @@
1268
  "cpu": [
1269
  "x64"
1270
  ],
1271
- "dev": true,
1272
  "license": "MIT",
1273
  "optional": true,
1274
  "os": [
@@ -1282,7 +1254,6 @@
1282
  "cpu": [
1283
  "arm64"
1284
  ],
1285
- "dev": true,
1286
  "license": "MIT",
1287
  "optional": true,
1288
  "os": [
@@ -1296,7 +1267,6 @@
1296
  "cpu": [
1297
  "x64"
1298
  ],
1299
- "dev": true,
1300
  "license": "MIT",
1301
  "optional": true,
1302
  "os": [
@@ -1310,7 +1280,6 @@
1310
  "cpu": [
1311
  "arm"
1312
  ],
1313
- "dev": true,
1314
  "license": "MIT",
1315
  "optional": true,
1316
  "os": [
@@ -1324,7 +1293,6 @@
1324
  "cpu": [
1325
  "arm"
1326
  ],
1327
- "dev": true,
1328
  "license": "MIT",
1329
  "optional": true,
1330
  "os": [
@@ -1338,7 +1306,6 @@
1338
  "cpu": [
1339
  "arm64"
1340
  ],
1341
- "dev": true,
1342
  "license": "MIT",
1343
  "optional": true,
1344
  "os": [
@@ -1352,7 +1319,6 @@
1352
  "cpu": [
1353
  "arm64"
1354
  ],
1355
- "dev": true,
1356
  "license": "MIT",
1357
  "optional": true,
1358
  "os": [
@@ -1366,7 +1332,6 @@
1366
  "cpu": [
1367
  "loong64"
1368
  ],
1369
- "dev": true,
1370
  "license": "MIT",
1371
  "optional": true,
1372
  "os": [
@@ -1380,7 +1345,6 @@
1380
  "cpu": [
1381
  "ppc64"
1382
  ],
1383
- "dev": true,
1384
  "license": "MIT",
1385
  "optional": true,
1386
  "os": [
@@ -1394,7 +1358,6 @@
1394
  "cpu": [
1395
  "riscv64"
1396
  ],
1397
- "dev": true,
1398
  "license": "MIT",
1399
  "optional": true,
1400
  "os": [
@@ -1408,7 +1371,6 @@
1408
  "cpu": [
1409
  "s390x"
1410
  ],
1411
- "dev": true,
1412
  "license": "MIT",
1413
  "optional": true,
1414
  "os": [
@@ -1422,7 +1384,6 @@
1422
  "cpu": [
1423
  "x64"
1424
  ],
1425
- "dev": true,
1426
  "license": "MIT",
1427
  "optional": true,
1428
  "os": [
@@ -1436,7 +1397,6 @@
1436
  "cpu": [
1437
  "x64"
1438
  ],
1439
- "dev": true,
1440
  "license": "MIT",
1441
  "optional": true,
1442
  "os": [
@@ -1450,7 +1410,6 @@
1450
  "cpu": [
1451
  "arm64"
1452
  ],
1453
- "dev": true,
1454
  "license": "MIT",
1455
  "optional": true,
1456
  "os": [
@@ -1464,7 +1423,6 @@
1464
  "cpu": [
1465
  "ia32"
1466
  ],
1467
- "dev": true,
1468
  "license": "MIT",
1469
  "optional": true,
1470
  "os": [
@@ -1478,7 +1436,6 @@
1478
  "cpu": [
1479
  "x64"
1480
  ],
1481
- "dev": true,
1482
  "license": "MIT",
1483
  "optional": true,
1484
  "os": [
@@ -1540,7 +1497,6 @@
1540
  "version": "1.0.6",
1541
  "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
1542
  "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
1543
- "dev": true,
1544
  "license": "MIT"
1545
  },
1546
  "node_modules/@types/eventsource": {
@@ -1947,7 +1903,6 @@
1947
  "version": "3.0.3",
1948
  "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
1949
  "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
1950
- "dev": true,
1951
  "license": "MIT",
1952
  "dependencies": {
1953
  "fill-range": "^7.1.1"
@@ -2195,7 +2150,6 @@
2195
  "version": "0.24.2",
2196
  "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz",
2197
  "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==",
2198
- "dev": true,
2199
  "hasInstallScript": true,
2200
  "license": "MIT",
2201
  "bin": {
@@ -2524,7 +2478,6 @@
2524
  "version": "7.1.1",
2525
  "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
2526
  "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
2527
- "dev": true,
2528
  "license": "MIT",
2529
  "dependencies": {
2530
  "to-regex-range": "^5.0.1"
@@ -2575,7 +2528,6 @@
2575
  "version": "2.3.3",
2576
  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
2577
  "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
2578
- "dev": true,
2579
  "hasInstallScript": true,
2580
  "license": "MIT",
2581
  "optional": true,
@@ -2742,7 +2694,6 @@
2742
  "version": "7.0.0",
2743
  "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
2744
  "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
2745
- "dev": true,
2746
  "license": "MIT",
2747
  "engines": {
2748
  "node": ">=0.12.0"
@@ -2893,7 +2844,6 @@
2893
  "version": "4.0.8",
2894
  "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
2895
  "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
2896
- "dev": true,
2897
  "license": "MIT",
2898
  "dependencies": {
2899
  "braces": "^3.0.3",
@@ -2980,7 +2930,6 @@
2980
  "version": "3.3.8",
2981
  "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
2982
  "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
2983
- "dev": true,
2984
  "funding": [
2985
  {
2986
  "type": "github",
@@ -3125,7 +3074,6 @@
3125
  "version": "2.3.1",
3126
  "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
3127
  "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
3128
- "dev": true,
3129
  "license": "MIT",
3130
  "engines": {
3131
  "node": ">=8.6"
@@ -3138,7 +3086,6 @@
3138
  "version": "8.5.2",
3139
  "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.2.tgz",
3140
  "integrity": "sha512-MjOadfU3Ys9KYoX0AdkBlFEF1Vx37uCCeN4ZHnmwm9FfpbsGWMZeBLMmmpY+6Ocqod7mkdZ0DT31OlbsFrLlkA==",
3141
- "dev": true,
3142
  "funding": [
3143
  {
3144
  "type": "opencollective",
@@ -3292,7 +3239,6 @@
3292
  "version": "4.34.7",
3293
  "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.7.tgz",
3294
  "integrity": "sha512-8qhyN0oZ4x0H6wmBgfKxJtxM7qS98YJ0k0kNh5ECVtuchIJ7z9IVVvzpmtQyT10PXKMtBxYr1wQ5Apg8RS8kXQ==",
3295
- "dev": true,
3296
  "license": "MIT",
3297
  "dependencies": {
3298
  "@types/estree": "1.0.6"
@@ -3415,7 +3361,6 @@
3415
  "version": "1.2.1",
3416
  "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
3417
  "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
3418
- "dev": true,
3419
  "license": "BSD-3-Clause",
3420
  "engines": {
3421
  "node": ">=0.10.0"
@@ -3498,7 +3443,6 @@
3498
  "version": "5.0.1",
3499
  "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
3500
  "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
3501
- "dev": true,
3502
  "license": "MIT",
3503
  "dependencies": {
3504
  "is-number": "^7.0.0"
@@ -3660,7 +3604,6 @@
3660
  "version": "6.1.0",
3661
  "resolved": "https://registry.npmjs.org/vite/-/vite-6.1.0.tgz",
3662
  "integrity": "sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==",
3663
- "dev": true,
3664
  "license": "MIT",
3665
  "dependencies": {
3666
  "esbuild": "^0.24.2",
@@ -3728,6 +3671,22 @@
3728
  }
3729
  }
3730
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3731
  "node_modules/which": {
3732
  "version": "2.0.2",
3733
  "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
 
10
  "dependencies": {
11
  "@gradio/client": "^1.12.0",
12
  "react": "^19.0.0",
13
+ "react-dom": "^19.0.0",
14
+ "vite-plugin-singlefile": "^2.1.0"
15
  },
16
  "devDependencies": {
17
  "@eslint/js": "^9.19.0",
 
358
  "cpu": [
359
  "ppc64"
360
  ],
 
361
  "license": "MIT",
362
  "optional": true,
363
  "os": [
 
374
  "cpu": [
375
  "arm"
376
  ],
 
377
  "license": "MIT",
378
  "optional": true,
379
  "os": [
 
390
  "cpu": [
391
  "arm64"
392
  ],
 
393
  "license": "MIT",
394
  "optional": true,
395
  "os": [
 
406
  "cpu": [
407
  "x64"
408
  ],
 
409
  "license": "MIT",
410
  "optional": true,
411
  "os": [
 
422
  "cpu": [
423
  "arm64"
424
  ],
 
425
  "license": "MIT",
426
  "optional": true,
427
  "os": [
 
438
  "cpu": [
439
  "x64"
440
  ],
 
441
  "license": "MIT",
442
  "optional": true,
443
  "os": [
 
454
  "cpu": [
455
  "arm64"
456
  ],
 
457
  "license": "MIT",
458
  "optional": true,
459
  "os": [
 
470
  "cpu": [
471
  "x64"
472
  ],
 
473
  "license": "MIT",
474
  "optional": true,
475
  "os": [
 
486
  "cpu": [
487
  "arm"
488
  ],
 
489
  "license": "MIT",
490
  "optional": true,
491
  "os": [
 
502
  "cpu": [
503
  "arm64"
504
  ],
 
505
  "license": "MIT",
506
  "optional": true,
507
  "os": [
 
518
  "cpu": [
519
  "ia32"
520
  ],
 
521
  "license": "MIT",
522
  "optional": true,
523
  "os": [
 
534
  "cpu": [
535
  "loong64"
536
  ],
 
537
  "license": "MIT",
538
  "optional": true,
539
  "os": [
 
550
  "cpu": [
551
  "mips64el"
552
  ],
 
553
  "license": "MIT",
554
  "optional": true,
555
  "os": [
 
566
  "cpu": [
567
  "ppc64"
568
  ],
 
569
  "license": "MIT",
570
  "optional": true,
571
  "os": [
 
582
  "cpu": [
583
  "riscv64"
584
  ],
 
585
  "license": "MIT",
586
  "optional": true,
587
  "os": [
 
598
  "cpu": [
599
  "s390x"
600
  ],
 
601
  "license": "MIT",
602
  "optional": true,
603
  "os": [
 
614
  "cpu": [
615
  "x64"
616
  ],
 
617
  "license": "MIT",
618
  "optional": true,
619
  "os": [
 
630
  "cpu": [
631
  "arm64"
632
  ],
 
633
  "license": "MIT",
634
  "optional": true,
635
  "os": [
 
646
  "cpu": [
647
  "x64"
648
  ],
 
649
  "license": "MIT",
650
  "optional": true,
651
  "os": [
 
662
  "cpu": [
663
  "arm64"
664
  ],
 
665
  "license": "MIT",
666
  "optional": true,
667
  "os": [
 
678
  "cpu": [
679
  "x64"
680
  ],
 
681
  "license": "MIT",
682
  "optional": true,
683
  "os": [
 
694
  "cpu": [
695
  "x64"
696
  ],
 
697
  "license": "MIT",
698
  "optional": true,
699
  "os": [
 
710
  "cpu": [
711
  "arm64"
712
  ],
 
713
  "license": "MIT",
714
  "optional": true,
715
  "os": [
 
726
  "cpu": [
727
  "ia32"
728
  ],
 
729
  "license": "MIT",
730
  "optional": true,
731
  "os": [
 
742
  "cpu": [
743
  "x64"
744
  ],
 
745
  "license": "MIT",
746
  "optional": true,
747
  "os": [
 
1202
  "cpu": [
1203
  "arm"
1204
  ],
 
1205
  "license": "MIT",
1206
  "optional": true,
1207
  "os": [
 
1215
  "cpu": [
1216
  "arm64"
1217
  ],
 
1218
  "license": "MIT",
1219
  "optional": true,
1220
  "os": [
 
1228
  "cpu": [
1229
  "arm64"
1230
  ],
 
1231
  "license": "MIT",
1232
  "optional": true,
1233
  "os": [
 
1241
  "cpu": [
1242
  "x64"
1243
  ],
 
1244
  "license": "MIT",
1245
  "optional": true,
1246
  "os": [
 
1254
  "cpu": [
1255
  "arm64"
1256
  ],
 
1257
  "license": "MIT",
1258
  "optional": true,
1259
  "os": [
 
1267
  "cpu": [
1268
  "x64"
1269
  ],
 
1270
  "license": "MIT",
1271
  "optional": true,
1272
  "os": [
 
1280
  "cpu": [
1281
  "arm"
1282
  ],
 
1283
  "license": "MIT",
1284
  "optional": true,
1285
  "os": [
 
1293
  "cpu": [
1294
  "arm"
1295
  ],
 
1296
  "license": "MIT",
1297
  "optional": true,
1298
  "os": [
 
1306
  "cpu": [
1307
  "arm64"
1308
  ],
 
1309
  "license": "MIT",
1310
  "optional": true,
1311
  "os": [
 
1319
  "cpu": [
1320
  "arm64"
1321
  ],
 
1322
  "license": "MIT",
1323
  "optional": true,
1324
  "os": [
 
1332
  "cpu": [
1333
  "loong64"
1334
  ],
 
1335
  "license": "MIT",
1336
  "optional": true,
1337
  "os": [
 
1345
  "cpu": [
1346
  "ppc64"
1347
  ],
 
1348
  "license": "MIT",
1349
  "optional": true,
1350
  "os": [
 
1358
  "cpu": [
1359
  "riscv64"
1360
  ],
 
1361
  "license": "MIT",
1362
  "optional": true,
1363
  "os": [
 
1371
  "cpu": [
1372
  "s390x"
1373
  ],
 
1374
  "license": "MIT",
1375
  "optional": true,
1376
  "os": [
 
1384
  "cpu": [
1385
  "x64"
1386
  ],
 
1387
  "license": "MIT",
1388
  "optional": true,
1389
  "os": [
 
1397
  "cpu": [
1398
  "x64"
1399
  ],
 
1400
  "license": "MIT",
1401
  "optional": true,
1402
  "os": [
 
1410
  "cpu": [
1411
  "arm64"
1412
  ],
 
1413
  "license": "MIT",
1414
  "optional": true,
1415
  "os": [
 
1423
  "cpu": [
1424
  "ia32"
1425
  ],
 
1426
  "license": "MIT",
1427
  "optional": true,
1428
  "os": [
 
1436
  "cpu": [
1437
  "x64"
1438
  ],
 
1439
  "license": "MIT",
1440
  "optional": true,
1441
  "os": [
 
1497
  "version": "1.0.6",
1498
  "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
1499
  "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
 
1500
  "license": "MIT"
1501
  },
1502
  "node_modules/@types/eventsource": {
 
1903
  "version": "3.0.3",
1904
  "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
1905
  "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
 
1906
  "license": "MIT",
1907
  "dependencies": {
1908
  "fill-range": "^7.1.1"
 
2150
  "version": "0.24.2",
2151
  "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz",
2152
  "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==",
 
2153
  "hasInstallScript": true,
2154
  "license": "MIT",
2155
  "bin": {
 
2478
  "version": "7.1.1",
2479
  "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
2480
  "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
 
2481
  "license": "MIT",
2482
  "dependencies": {
2483
  "to-regex-range": "^5.0.1"
 
2528
  "version": "2.3.3",
2529
  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
2530
  "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
 
2531
  "hasInstallScript": true,
2532
  "license": "MIT",
2533
  "optional": true,
 
2694
  "version": "7.0.0",
2695
  "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
2696
  "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
 
2697
  "license": "MIT",
2698
  "engines": {
2699
  "node": ">=0.12.0"
 
2844
  "version": "4.0.8",
2845
  "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
2846
  "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
 
2847
  "license": "MIT",
2848
  "dependencies": {
2849
  "braces": "^3.0.3",
 
2930
  "version": "3.3.8",
2931
  "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
2932
  "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
 
2933
  "funding": [
2934
  {
2935
  "type": "github",
 
3074
  "version": "2.3.1",
3075
  "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
3076
  "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
 
3077
  "license": "MIT",
3078
  "engines": {
3079
  "node": ">=8.6"
 
3086
  "version": "8.5.2",
3087
  "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.2.tgz",
3088
  "integrity": "sha512-MjOadfU3Ys9KYoX0AdkBlFEF1Vx37uCCeN4ZHnmwm9FfpbsGWMZeBLMmmpY+6Ocqod7mkdZ0DT31OlbsFrLlkA==",
 
3089
  "funding": [
3090
  {
3091
  "type": "opencollective",
 
3239
  "version": "4.34.7",
3240
  "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.7.tgz",
3241
  "integrity": "sha512-8qhyN0oZ4x0H6wmBgfKxJtxM7qS98YJ0k0kNh5ECVtuchIJ7z9IVVvzpmtQyT10PXKMtBxYr1wQ5Apg8RS8kXQ==",
 
3242
  "license": "MIT",
3243
  "dependencies": {
3244
  "@types/estree": "1.0.6"
 
3361
  "version": "1.2.1",
3362
  "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
3363
  "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
 
3364
  "license": "BSD-3-Clause",
3365
  "engines": {
3366
  "node": ">=0.10.0"
 
3443
  "version": "5.0.1",
3444
  "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
3445
  "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
 
3446
  "license": "MIT",
3447
  "dependencies": {
3448
  "is-number": "^7.0.0"
 
3604
  "version": "6.1.0",
3605
  "resolved": "https://registry.npmjs.org/vite/-/vite-6.1.0.tgz",
3606
  "integrity": "sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==",
 
3607
  "license": "MIT",
3608
  "dependencies": {
3609
  "esbuild": "^0.24.2",
 
3671
  }
3672
  }
3673
  },
3674
+ "node_modules/vite-plugin-singlefile": {
3675
+ "version": "2.1.0",
3676
+ "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-2.1.0.tgz",
3677
+ "integrity": "sha512-7tJo+UgZABlKpY/nubth/wxJ4+pUGREPnEwNOknxwl2MM0zTvF14KTU4Ln1lc140gjLLV5mjDrvuoquU7OZqCg==",
3678
+ "license": "MIT",
3679
+ "dependencies": {
3680
+ "micromatch": "^4.0.8"
3681
+ },
3682
+ "engines": {
3683
+ "node": ">18.0.0"
3684
+ },
3685
+ "peerDependencies": {
3686
+ "rollup": "^4.28.1",
3687
+ "vite": "^5.4.11 || ^6.0.0"
3688
+ }
3689
+ },
3690
  "node_modules/which": {
3691
  "version": "2.0.2",
3692
  "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
front/package.json CHANGED
@@ -12,7 +12,8 @@
12
  "dependencies": {
13
  "@gradio/client": "^1.12.0",
14
  "react": "^19.0.0",
15
- "react-dom": "^19.0.0"
 
16
  },
17
  "devDependencies": {
18
  "@eslint/js": "^9.19.0",
 
12
  "dependencies": {
13
  "@gradio/client": "^1.12.0",
14
  "react": "^19.0.0",
15
+ "react-dom": "^19.0.0",
16
+ "vite-plugin-singlefile": "^2.1.0"
17
  },
18
  "devDependencies": {
19
  "@eslint/js": "^9.19.0",
front/vite.config.ts CHANGED
@@ -1,7 +1,8 @@
1
  import { defineConfig } from 'vite'
2
  import react from '@vitejs/plugin-react'
 
3
 
4
  // https://vite.dev/config/
5
  export default defineConfig({
6
- plugins: [react()],
7
  })
 
1
  import { defineConfig } from 'vite'
2
  import react from '@vitejs/plugin-react'
3
+ import { viteSingleFile } from 'vite-plugin-singlefile';
4
 
5
  // https://vite.dev/config/
6
  export default defineConfig({
7
+ plugins: [react(), viteSingleFile()],
8
  })