jbilcke-hf HF staff commited on
Commit
3d4392e
β€’
1 Parent(s): f42b4a1

working on some new features

Browse files
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. .env +5 -0
  2. next.config.js +9 -0
  3. package-lock.json +245 -0
  4. package.json +6 -0
  5. public/bubble.jpg +0 -0
  6. public/favicon.ico +0 -0
  7. public/favicon/favicon-114-precomposed.png +0 -0
  8. public/favicon/favicon-120-precomposed.png +0 -0
  9. public/favicon/favicon-144-precomposed.png +0 -0
  10. public/favicon/favicon-152-precomposed.png +0 -0
  11. public/favicon/favicon-180-precomposed.png +0 -0
  12. public/favicon/favicon-192.png +0 -0
  13. public/favicon/favicon-32.png +0 -0
  14. public/favicon/favicon-36.png +0 -0
  15. public/favicon/favicon-48.png +0 -0
  16. public/favicon/favicon-57.png +0 -0
  17. public/favicon/favicon-60.png +0 -0
  18. public/favicon/favicon-72-precomposed.png +0 -0
  19. public/favicon/favicon-72.png +0 -0
  20. public/favicon/favicon-76.png +0 -0
  21. public/favicon/favicon-96.png +0 -0
  22. public/favicon/favicon.ico +0 -0
  23. public/favicon/manifest.json +0 -41
  24. public/huggingface-avatar.jpeg +0 -0
  25. public/icon.png +0 -0
  26. public/mask.png +0 -0
  27. public/next.svg +0 -1
  28. public/report.jpg +0 -0
  29. public/vercel.svg +0 -1
  30. src/app/{server β†’ api}/actions/README.md +0 -0
  31. src/app/{server β†’ api}/actions/ai-tube-hf/README.md +0 -0
  32. src/app/{server β†’ api}/actions/ai-tube-hf/deleteFileFromDataset.ts +0 -0
  33. src/app/{server β†’ api}/actions/ai-tube-hf/deleteVideoRequest.ts +1 -1
  34. src/app/{server β†’ api}/actions/ai-tube-hf/downloadClapProject.ts +2 -2
  35. src/app/{server β†’ api}/actions/ai-tube-hf/downloadFileAsBlob.ts +0 -0
  36. src/app/{server β†’ api}/actions/ai-tube-hf/downloadFileAsText.ts +0 -0
  37. src/app/{server β†’ api}/actions/ai-tube-hf/downloadPlainText.ts +0 -0
  38. src/app/{server β†’ api}/actions/ai-tube-hf/extendVideosWithStats.ts +0 -0
  39. src/app/{server β†’ api}/actions/ai-tube-hf/getChannel.ts +0 -0
  40. src/app/{server β†’ api}/actions/ai-tube-hf/getChannelVideos.ts +1 -1
  41. src/app/{server β†’ api}/actions/ai-tube-hf/getChannels.ts +0 -0
  42. src/app/{server β†’ api}/actions/ai-tube-hf/getCredentials.ts +0 -0
  43. src/app/{server β†’ api}/actions/ai-tube-hf/getPrivateChannels.ts +0 -0
  44. src/app/{server β†’ api}/actions/ai-tube-hf/getTags.ts +0 -0
  45. src/app/{server β†’ api}/actions/ai-tube-hf/getVideo.ts +0 -0
  46. src/app/{server β†’ api}/actions/ai-tube-hf/getVideoIndex.ts +0 -0
  47. src/app/{server β†’ api}/actions/ai-tube-hf/getVideoRequestsFromChannel.ts +3 -3
  48. src/app/{server β†’ api}/actions/ai-tube-hf/getVideos.ts +7 -7
  49. src/app/{server β†’ api}/actions/ai-tube-hf/parseChannel.ts +1 -1
  50. src/app/{server β†’ api}/actions/ai-tube-hf/uploadVideoRequestToDataset.ts +2 -2
.env CHANGED
@@ -17,6 +17,11 @@ WINNERS=""
17
 
18
  AUTH_ALCHEMY_API_KEY=""
19
 
 
 
 
 
 
20
  # ----------- CENSORSHIP -------
21
  ENABLE_CENSORSHIP=
22
  FINGERPRINT_KEY=
 
17
 
18
  AUTH_ALCHEMY_API_KEY=""
19
 
20
+ AUTH_OPENAI_API_KEY=""
21
+
22
+ VIDEOCHAIN_API_URL=""
23
+ VIDEOCHAIN_API_KEY=""
24
+
25
  # ----------- CENSORSHIP -------
26
  ENABLE_CENSORSHIP=
27
  FINGERPRINT_KEY=
next.config.js CHANGED
@@ -1,6 +1,15 @@
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
3
  output: 'standalone',
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
  module.exports = nextConfig
 
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
3
  output: 'standalone',
4
+ experimental: {
5
+ serverActions: {
6
+
7
+ // necessary as we are generating Clap files on server-side
8
+ // however, we are only generating text and not assets, so it should be lightweight,
9
+ // usually below 2mb
10
+ bodySizeLimit: '4mb',
11
+ },
12
+ }
13
  }
14
 
15
  module.exports = nextConfig
package-lock.json CHANGED
@@ -9,7 +9,9 @@
9
  "version": "0.0.0",
10
  "dependencies": {
11
  "@huggingface/hub": "0.12.3-oauth",
 
12
  "@jcoreio/async-throttle": "^1.6.0",
 
13
  "@photo-sphere-viewer/core": "^5.7.2",
14
  "@photo-sphere-viewer/equirectangular-video-adapter": "^5.7.2",
15
  "@photo-sphere-viewer/gyroscope-plugin": "^5.7.2",
@@ -38,6 +40,7 @@
38
  "@radix-ui/react-toast": "^1.1.5",
39
  "@radix-ui/react-tooltip": "^1.0.7",
40
  "@react-spring/web": "^9.7.3",
 
41
  "@types/lodash.debounce": "^4.0.9",
42
  "@types/node": "20.4.2",
43
  "@types/react": "18.2.15",
@@ -62,10 +65,12 @@
62
  "markdown-yaml-metadata-parser": "^3.0.0",
63
  "minisearch": "^6.3.0",
64
  "next": "^14.1.4",
 
65
  "photo-sphere-viewer-lensflare-plugin": "^2.1.2",
66
  "pick": "^0.0.1",
67
  "postcss": "8.4.38",
68
  "qs": "^6.12.0",
 
69
  "react": "18.2.0",
70
  "react-circular-progressbar": "^2.1.0",
71
  "react-copy-to-clipboard": "^5.1.0",
@@ -77,6 +82,7 @@
77
  "react-tuby": "^0.1.24",
78
  "react-virtualized-auto-sizer": "^1.0.20",
79
  "react-window-infinite-loader": "^1.0.9",
 
80
  "sbd": "^1.0.19",
81
  "sentence-splitter": "^4.3.0",
82
  "sharp": "^0.33.3",
@@ -924,6 +930,14 @@
924
  "node": ">=18"
925
  }
926
  },
 
 
 
 
 
 
 
 
927
  "node_modules/@humanwhocodes/config-array": {
928
  "version": "0.11.14",
929
  "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
@@ -1477,6 +1491,11 @@
1477
  "@jridgewell/sourcemap-codec": "^1.4.14"
1478
  }
1479
  },
 
 
 
 
 
1480
  "node_modules/@next/env": {
1481
  "version": "14.1.4",
1482
  "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.4.tgz",
@@ -2852,6 +2871,14 @@
2852
  "tslib": "^2.4.0"
2853
  }
2854
  },
 
 
 
 
 
 
 
 
2855
  "node_modules/@textlint/ast-node-types": {
2856
  "version": "13.4.1",
2857
  "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-13.4.1.tgz",
@@ -2905,6 +2932,15 @@
2905
  "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz",
2906
  "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw=="
2907
  },
 
 
 
 
 
 
 
 
 
2908
  "node_modules/@types/prop-types": {
2909
  "version": "15.7.12",
2910
  "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz",
@@ -3101,6 +3137,17 @@
3101
  "crypto-js": "^4.2.0"
3102
  }
3103
  },
 
 
 
 
 
 
 
 
 
 
 
3104
  "node_modules/acorn": {
3105
  "version": "8.11.3",
3106
  "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
@@ -3133,6 +3180,17 @@
3133
  "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
3134
  "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw=="
3135
  },
 
 
 
 
 
 
 
 
 
 
 
3136
  "node_modules/ajv": {
3137
  "version": "6.12.6",
3138
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -4021,6 +4079,14 @@
4021
  }
4022
  }
4023
  },
 
 
 
 
 
 
 
 
4024
  "node_modules/deep-is": {
4025
  "version": "0.1.4",
4026
  "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
@@ -4879,6 +4945,14 @@
4879
  "es5-ext": "~0.10.14"
4880
  }
4881
  },
 
 
 
 
 
 
 
 
4882
  "node_modules/eventemitter3": {
4883
  "version": "5.0.1",
4884
  "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
@@ -4977,6 +5051,17 @@
4977
  "node": ">=8"
4978
  }
4979
  },
 
 
 
 
 
 
 
 
 
 
 
4980
  "node_modules/find-up": {
4981
  "version": "5.0.0",
4982
  "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
@@ -5065,6 +5150,31 @@
5065
  "node": ">= 6"
5066
  }
5067
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5068
  "node_modules/fraction.js": {
5069
  "version": "4.3.7",
5070
  "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
@@ -5411,6 +5521,14 @@
5411
  "entities": "^4.4.0"
5412
  }
5413
  },
 
 
 
 
 
 
 
 
5414
  "node_modules/ignore": {
5415
  "version": "5.3.1",
5416
  "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
@@ -6277,6 +6395,43 @@
6277
  "node": "^10 || ^12 || >=14"
6278
  }
6279
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6280
  "node_modules/node-gyp-build": {
6281
  "version": "4.8.0",
6282
  "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz",
@@ -6440,6 +6595,32 @@
6440
  "wrappy": "1"
6441
  }
6442
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6443
  "node_modules/optionator": {
6444
  "version": "0.9.3",
6445
  "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
@@ -6803,6 +6984,22 @@
6803
  "url": "https://github.com/sponsors/ljharb"
6804
  }
6805
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6806
  "node_modules/queue-microtask": {
6807
  "version": "1.2.3",
6808
  "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -7156,6 +7353,11 @@
7156
  "queue-microtask": "^1.2.2"
7157
  }
7158
  },
 
 
 
 
 
7159
  "node_modules/safe-array-concat": {
7160
  "version": "1.1.2",
7161
  "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
@@ -7391,6 +7593,17 @@
7391
  "node": ">=0.10.0"
7392
  }
7393
  },
 
 
 
 
 
 
 
 
 
 
 
7394
  "node_modules/sprintf-js": {
7395
  "version": "1.0.3",
7396
  "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
@@ -7885,6 +8098,11 @@
7885
  "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
7886
  "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
7887
  },
 
 
 
 
 
7888
  "node_modules/ts-interface-checker": {
7889
  "version": "0.1.13",
7890
  "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
@@ -8102,6 +8320,11 @@
8102
  "url": "https://github.com/sponsors/ljharb"
8103
  }
8104
  },
 
 
 
 
 
8105
  "node_modules/update-browserslist-db": {
8106
  "version": "1.0.13",
8107
  "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
@@ -8236,6 +8459,19 @@
8236
  "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
8237
  "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg=="
8238
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
8239
  "node_modules/websocket": {
8240
  "version": "1.0.34",
8241
  "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz",
@@ -8265,6 +8501,15 @@
8265
  "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
8266
  "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
8267
  },
 
 
 
 
 
 
 
 
 
8268
  "node_modules/which": {
8269
  "version": "2.0.2",
8270
  "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
 
9
  "version": "0.0.0",
10
  "dependencies": {
11
  "@huggingface/hub": "0.12.3-oauth",
12
+ "@huggingface/inference": "^2.6.7",
13
  "@jcoreio/async-throttle": "^1.6.0",
14
+ "@mediapipe/tasks-vision": "^0.10.12",
15
  "@photo-sphere-viewer/core": "^5.7.2",
16
  "@photo-sphere-viewer/equirectangular-video-adapter": "^5.7.2",
17
  "@photo-sphere-viewer/gyroscope-plugin": "^5.7.2",
 
40
  "@radix-ui/react-toast": "^1.1.5",
41
  "@radix-ui/react-tooltip": "^1.0.7",
42
  "@react-spring/web": "^9.7.3",
43
+ "@tailwindcss/container-queries": "^0.1.1",
44
  "@types/lodash.debounce": "^4.0.9",
45
  "@types/node": "20.4.2",
46
  "@types/react": "18.2.15",
 
65
  "markdown-yaml-metadata-parser": "^3.0.0",
66
  "minisearch": "^6.3.0",
67
  "next": "^14.1.4",
68
+ "openai": "^4.36.0",
69
  "photo-sphere-viewer-lensflare-plugin": "^2.1.2",
70
  "pick": "^0.0.1",
71
  "postcss": "8.4.38",
72
  "qs": "^6.12.0",
73
+ "query-string": "^9.0.0",
74
  "react": "18.2.0",
75
  "react-circular-progressbar": "^2.1.0",
76
  "react-copy-to-clipboard": "^5.1.0",
 
82
  "react-tuby": "^0.1.24",
83
  "react-virtualized-auto-sizer": "^1.0.20",
84
  "react-window-infinite-loader": "^1.0.9",
85
+ "runcss": "^0.1.6",
86
  "sbd": "^1.0.19",
87
  "sentence-splitter": "^4.3.0",
88
  "sharp": "^0.33.3",
 
930
  "node": ">=18"
931
  }
932
  },
933
+ "node_modules/@huggingface/inference": {
934
+ "version": "2.6.7",
935
+ "resolved": "https://registry.npmjs.org/@huggingface/inference/-/inference-2.6.7.tgz",
936
+ "integrity": "sha512-vFBqvtU3LhxjufTs0jcRrDSc0nK+lah10bOgvlIn80lAH4JwMzHHPBQ4g4ECEdRD0PIt6EpTiidEZQq2sArb5Q==",
937
+ "engines": {
938
+ "node": ">=18"
939
+ }
940
+ },
941
  "node_modules/@humanwhocodes/config-array": {
942
  "version": "0.11.14",
943
  "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
 
1491
  "@jridgewell/sourcemap-codec": "^1.4.14"
1492
  }
1493
  },
1494
+ "node_modules/@mediapipe/tasks-vision": {
1495
+ "version": "0.10.12",
1496
+ "resolved": "https://registry.npmjs.org/@mediapipe/tasks-vision/-/tasks-vision-0.10.12.tgz",
1497
+ "integrity": "sha512-688Vukid7hvGmx+7hzS/EQ3Q4diz4eeX4/FYDw8f/t56UjFueD8LTvA2rX5BCIwvT0oy8QHKh5uKIyct1AOFtQ=="
1498
+ },
1499
  "node_modules/@next/env": {
1500
  "version": "14.1.4",
1501
  "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.4.tgz",
 
2871
  "tslib": "^2.4.0"
2872
  }
2873
  },
2874
+ "node_modules/@tailwindcss/container-queries": {
2875
+ "version": "0.1.1",
2876
+ "resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz",
2877
+ "integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==",
2878
+ "peerDependencies": {
2879
+ "tailwindcss": ">=3.2.0"
2880
+ }
2881
+ },
2882
  "node_modules/@textlint/ast-node-types": {
2883
  "version": "13.4.1",
2884
  "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-13.4.1.tgz",
 
2932
  "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz",
2933
  "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw=="
2934
  },
2935
+ "node_modules/@types/node-fetch": {
2936
+ "version": "2.6.11",
2937
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz",
2938
+ "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==",
2939
+ "dependencies": {
2940
+ "@types/node": "*",
2941
+ "form-data": "^4.0.0"
2942
+ }
2943
+ },
2944
  "node_modules/@types/prop-types": {
2945
  "version": "15.7.12",
2946
  "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz",
 
3137
  "crypto-js": "^4.2.0"
3138
  }
3139
  },
3140
+ "node_modules/abort-controller": {
3141
+ "version": "3.0.0",
3142
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
3143
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
3144
+ "dependencies": {
3145
+ "event-target-shim": "^5.0.0"
3146
+ },
3147
+ "engines": {
3148
+ "node": ">=6.5"
3149
+ }
3150
+ },
3151
  "node_modules/acorn": {
3152
  "version": "8.11.3",
3153
  "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
 
3180
  "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
3181
  "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw=="
3182
  },
3183
+ "node_modules/agentkeepalive": {
3184
+ "version": "4.5.0",
3185
+ "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz",
3186
+ "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==",
3187
+ "dependencies": {
3188
+ "humanize-ms": "^1.2.1"
3189
+ },
3190
+ "engines": {
3191
+ "node": ">= 8.0.0"
3192
+ }
3193
+ },
3194
  "node_modules/ajv": {
3195
  "version": "6.12.6",
3196
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
 
4079
  }
4080
  }
4081
  },
4082
+ "node_modules/decode-uri-component": {
4083
+ "version": "0.4.1",
4084
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.4.1.tgz",
4085
+ "integrity": "sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==",
4086
+ "engines": {
4087
+ "node": ">=14.16"
4088
+ }
4089
+ },
4090
  "node_modules/deep-is": {
4091
  "version": "0.1.4",
4092
  "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
 
4945
  "es5-ext": "~0.10.14"
4946
  }
4947
  },
4948
+ "node_modules/event-target-shim": {
4949
+ "version": "5.0.1",
4950
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
4951
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
4952
+ "engines": {
4953
+ "node": ">=6"
4954
+ }
4955
+ },
4956
  "node_modules/eventemitter3": {
4957
  "version": "5.0.1",
4958
  "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
 
5051
  "node": ">=8"
5052
  }
5053
  },
5054
+ "node_modules/filter-obj": {
5055
+ "version": "5.1.0",
5056
+ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-5.1.0.tgz",
5057
+ "integrity": "sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==",
5058
+ "engines": {
5059
+ "node": ">=14.16"
5060
+ },
5061
+ "funding": {
5062
+ "url": "https://github.com/sponsors/sindresorhus"
5063
+ }
5064
+ },
5065
  "node_modules/find-up": {
5066
  "version": "5.0.0",
5067
  "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
 
5150
  "node": ">= 6"
5151
  }
5152
  },
5153
+ "node_modules/form-data-encoder": {
5154
+ "version": "1.7.2",
5155
+ "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
5156
+ "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A=="
5157
+ },
5158
+ "node_modules/formdata-node": {
5159
+ "version": "4.4.1",
5160
+ "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz",
5161
+ "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
5162
+ "dependencies": {
5163
+ "node-domexception": "1.0.0",
5164
+ "web-streams-polyfill": "4.0.0-beta.3"
5165
+ },
5166
+ "engines": {
5167
+ "node": ">= 12.20"
5168
+ }
5169
+ },
5170
+ "node_modules/formdata-node/node_modules/web-streams-polyfill": {
5171
+ "version": "4.0.0-beta.3",
5172
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
5173
+ "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",
5174
+ "engines": {
5175
+ "node": ">= 14"
5176
+ }
5177
+ },
5178
  "node_modules/fraction.js": {
5179
  "version": "4.3.7",
5180
  "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
 
5521
  "entities": "^4.4.0"
5522
  }
5523
  },
5524
+ "node_modules/humanize-ms": {
5525
+ "version": "1.2.1",
5526
+ "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
5527
+ "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
5528
+ "dependencies": {
5529
+ "ms": "^2.0.0"
5530
+ }
5531
+ },
5532
  "node_modules/ignore": {
5533
  "version": "5.3.1",
5534
  "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
 
6395
  "node": "^10 || ^12 || >=14"
6396
  }
6397
  },
6398
+ "node_modules/node-domexception": {
6399
+ "version": "1.0.0",
6400
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
6401
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
6402
+ "funding": [
6403
+ {
6404
+ "type": "github",
6405
+ "url": "https://github.com/sponsors/jimmywarting"
6406
+ },
6407
+ {
6408
+ "type": "github",
6409
+ "url": "https://paypal.me/jimmywarting"
6410
+ }
6411
+ ],
6412
+ "engines": {
6413
+ "node": ">=10.5.0"
6414
+ }
6415
+ },
6416
+ "node_modules/node-fetch": {
6417
+ "version": "2.7.0",
6418
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
6419
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
6420
+ "dependencies": {
6421
+ "whatwg-url": "^5.0.0"
6422
+ },
6423
+ "engines": {
6424
+ "node": "4.x || >=6.0.0"
6425
+ },
6426
+ "peerDependencies": {
6427
+ "encoding": "^0.1.0"
6428
+ },
6429
+ "peerDependenciesMeta": {
6430
+ "encoding": {
6431
+ "optional": true
6432
+ }
6433
+ }
6434
+ },
6435
  "node_modules/node-gyp-build": {
6436
  "version": "4.8.0",
6437
  "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz",
 
6595
  "wrappy": "1"
6596
  }
6597
  },
6598
+ "node_modules/openai": {
6599
+ "version": "4.36.0",
6600
+ "resolved": "https://registry.npmjs.org/openai/-/openai-4.36.0.tgz",
6601
+ "integrity": "sha512-AtYrhhWY64LhB9P6f3H0nV8nTSaQJ89mWPnfNU5CnYg81zlYaV8nkyO+aTNfprdqP/9xv10woNNUgefXINT4Dg==",
6602
+ "dependencies": {
6603
+ "@types/node": "^18.11.18",
6604
+ "@types/node-fetch": "^2.6.4",
6605
+ "abort-controller": "^3.0.0",
6606
+ "agentkeepalive": "^4.2.1",
6607
+ "form-data-encoder": "1.7.2",
6608
+ "formdata-node": "^4.3.2",
6609
+ "node-fetch": "^2.6.7",
6610
+ "web-streams-polyfill": "^3.2.1"
6611
+ },
6612
+ "bin": {
6613
+ "openai": "bin/cli"
6614
+ }
6615
+ },
6616
+ "node_modules/openai/node_modules/@types/node": {
6617
+ "version": "18.19.31",
6618
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz",
6619
+ "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==",
6620
+ "dependencies": {
6621
+ "undici-types": "~5.26.4"
6622
+ }
6623
+ },
6624
  "node_modules/optionator": {
6625
  "version": "0.9.3",
6626
  "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
 
6984
  "url": "https://github.com/sponsors/ljharb"
6985
  }
6986
  },
6987
+ "node_modules/query-string": {
6988
+ "version": "9.0.0",
6989
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-9.0.0.tgz",
6990
+ "integrity": "sha512-4EWwcRGsO2H+yzq6ddHcVqkCQ2EFUSfDMEjF8ryp8ReymyZhIuaFRGLomeOQLkrzacMHoyky2HW0Qe30UbzkKw==",
6991
+ "dependencies": {
6992
+ "decode-uri-component": "^0.4.1",
6993
+ "filter-obj": "^5.1.0",
6994
+ "split-on-first": "^3.0.0"
6995
+ },
6996
+ "engines": {
6997
+ "node": ">=18"
6998
+ },
6999
+ "funding": {
7000
+ "url": "https://github.com/sponsors/sindresorhus"
7001
+ }
7002
+ },
7003
  "node_modules/queue-microtask": {
7004
  "version": "1.2.3",
7005
  "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
 
7353
  "queue-microtask": "^1.2.2"
7354
  }
7355
  },
7356
+ "node_modules/runcss": {
7357
+ "version": "0.1.6",
7358
+ "resolved": "https://registry.npmjs.org/runcss/-/runcss-0.1.6.tgz",
7359
+ "integrity": "sha512-RyG7VVUxZi8+ynXA4YFH7N6uXK0QgULKTEEMmeUkK/uhfNGiQitWRKQp5b+1AEKu4/QTslFEx7wu971vQQk9Tg=="
7360
+ },
7361
  "node_modules/safe-array-concat": {
7362
  "version": "1.1.2",
7363
  "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
 
7593
  "node": ">=0.10.0"
7594
  }
7595
  },
7596
+ "node_modules/split-on-first": {
7597
+ "version": "3.0.0",
7598
+ "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-3.0.0.tgz",
7599
+ "integrity": "sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==",
7600
+ "engines": {
7601
+ "node": ">=12"
7602
+ },
7603
+ "funding": {
7604
+ "url": "https://github.com/sponsors/sindresorhus"
7605
+ }
7606
+ },
7607
  "node_modules/sprintf-js": {
7608
  "version": "1.0.3",
7609
  "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
 
8098
  "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
8099
  "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
8100
  },
8101
+ "node_modules/tr46": {
8102
+ "version": "0.0.3",
8103
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
8104
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
8105
+ },
8106
  "node_modules/ts-interface-checker": {
8107
  "version": "0.1.13",
8108
  "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
 
8320
  "url": "https://github.com/sponsors/ljharb"
8321
  }
8322
  },
8323
+ "node_modules/undici-types": {
8324
+ "version": "5.26.5",
8325
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
8326
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
8327
+ },
8328
  "node_modules/update-browserslist-db": {
8329
  "version": "1.0.13",
8330
  "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
 
8459
  "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
8460
  "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg=="
8461
  },
8462
+ "node_modules/web-streams-polyfill": {
8463
+ "version": "3.3.3",
8464
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
8465
+ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
8466
+ "engines": {
8467
+ "node": ">= 8"
8468
+ }
8469
+ },
8470
+ "node_modules/webidl-conversions": {
8471
+ "version": "3.0.1",
8472
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
8473
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
8474
+ },
8475
  "node_modules/websocket": {
8476
  "version": "1.0.34",
8477
  "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz",
 
8501
  "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
8502
  "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
8503
  },
8504
+ "node_modules/whatwg-url": {
8505
+ "version": "5.0.0",
8506
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
8507
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
8508
+ "dependencies": {
8509
+ "tr46": "~0.0.3",
8510
+ "webidl-conversions": "^3.0.0"
8511
+ }
8512
+ },
8513
  "node_modules/which": {
8514
  "version": "2.0.2",
8515
  "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
package.json CHANGED
@@ -10,7 +10,9 @@
10
  },
11
  "dependencies": {
12
  "@huggingface/hub": "0.12.3-oauth",
 
13
  "@jcoreio/async-throttle": "^1.6.0",
 
14
  "@photo-sphere-viewer/core": "^5.7.2",
15
  "@photo-sphere-viewer/equirectangular-video-adapter": "^5.7.2",
16
  "@photo-sphere-viewer/gyroscope-plugin": "^5.7.2",
@@ -39,6 +41,7 @@
39
  "@radix-ui/react-toast": "^1.1.5",
40
  "@radix-ui/react-tooltip": "^1.0.7",
41
  "@react-spring/web": "^9.7.3",
 
42
  "@types/lodash.debounce": "^4.0.9",
43
  "@types/node": "20.4.2",
44
  "@types/react": "18.2.15",
@@ -63,10 +66,12 @@
63
  "markdown-yaml-metadata-parser": "^3.0.0",
64
  "minisearch": "^6.3.0",
65
  "next": "^14.1.4",
 
66
  "photo-sphere-viewer-lensflare-plugin": "^2.1.2",
67
  "pick": "^0.0.1",
68
  "postcss": "8.4.38",
69
  "qs": "^6.12.0",
 
70
  "react": "18.2.0",
71
  "react-circular-progressbar": "^2.1.0",
72
  "react-copy-to-clipboard": "^5.1.0",
@@ -78,6 +83,7 @@
78
  "react-tuby": "^0.1.24",
79
  "react-virtualized-auto-sizer": "^1.0.20",
80
  "react-window-infinite-loader": "^1.0.9",
 
81
  "sbd": "^1.0.19",
82
  "sentence-splitter": "^4.3.0",
83
  "sharp": "^0.33.3",
 
10
  },
11
  "dependencies": {
12
  "@huggingface/hub": "0.12.3-oauth",
13
+ "@huggingface/inference": "^2.6.7",
14
  "@jcoreio/async-throttle": "^1.6.0",
15
+ "@mediapipe/tasks-vision": "^0.10.12",
16
  "@photo-sphere-viewer/core": "^5.7.2",
17
  "@photo-sphere-viewer/equirectangular-video-adapter": "^5.7.2",
18
  "@photo-sphere-viewer/gyroscope-plugin": "^5.7.2",
 
41
  "@radix-ui/react-toast": "^1.1.5",
42
  "@radix-ui/react-tooltip": "^1.0.7",
43
  "@react-spring/web": "^9.7.3",
44
+ "@tailwindcss/container-queries": "^0.1.1",
45
  "@types/lodash.debounce": "^4.0.9",
46
  "@types/node": "20.4.2",
47
  "@types/react": "18.2.15",
 
66
  "markdown-yaml-metadata-parser": "^3.0.0",
67
  "minisearch": "^6.3.0",
68
  "next": "^14.1.4",
69
+ "openai": "^4.36.0",
70
  "photo-sphere-viewer-lensflare-plugin": "^2.1.2",
71
  "pick": "^0.0.1",
72
  "postcss": "8.4.38",
73
  "qs": "^6.12.0",
74
+ "query-string": "^9.0.0",
75
  "react": "18.2.0",
76
  "react-circular-progressbar": "^2.1.0",
77
  "react-copy-to-clipboard": "^5.1.0",
 
83
  "react-tuby": "^0.1.24",
84
  "react-virtualized-auto-sizer": "^1.0.20",
85
  "react-window-infinite-loader": "^1.0.9",
86
+ "runcss": "^0.1.6",
87
  "sbd": "^1.0.19",
88
  "sentence-splitter": "^4.3.0",
89
  "sharp": "^0.33.3",
public/bubble.jpg DELETED
Binary file (128 kB)
 
public/favicon.ico CHANGED
public/favicon/favicon-114-precomposed.png DELETED
Binary file (8.3 kB)
 
public/favicon/favicon-120-precomposed.png DELETED
Binary file (8.78 kB)
 
public/favicon/favicon-144-precomposed.png DELETED
Binary file (12.2 kB)
 
public/favicon/favicon-152-precomposed.png DELETED
Binary file (12.8 kB)
 
public/favicon/favicon-180-precomposed.png DELETED
Binary file (16.4 kB)
 
public/favicon/favicon-192.png DELETED
Binary file (18.1 kB)
 
public/favicon/favicon-32.png DELETED
Binary file (1.45 kB)
 
public/favicon/favicon-36.png DELETED
Binary file (1.8 kB)
 
public/favicon/favicon-48.png DELETED
Binary file (2.67 kB)
 
public/favicon/favicon-57.png DELETED
Binary file (3.22 kB)
 
public/favicon/favicon-60.png DELETED
Binary file (3.46 kB)
 
public/favicon/favicon-72-precomposed.png DELETED
Binary file (4.52 kB)
 
public/favicon/favicon-72.png DELETED
Binary file (4.52 kB)
 
public/favicon/favicon-76.png DELETED
Binary file (4.87 kB)
 
public/favicon/favicon-96.png DELETED
Binary file (6.67 kB)
 
public/favicon/favicon.ico DELETED
Binary file (5.56 kB)
 
public/favicon/manifest.json DELETED
@@ -1,41 +0,0 @@
1
- {
2
- "name": "pollo",
3
- "icons": [
4
- {
5
- "src": "\/favicon-36.png",
6
- "sizes": "36x36",
7
- "type": "image\/png",
8
- "density": 0.75
9
- },
10
- {
11
- "src": "\/favicon-48.png",
12
- "sizes": "48x48",
13
- "type": "image\/png",
14
- "density": 1
15
- },
16
- {
17
- "src": "\/favicon-72.png",
18
- "sizes": "72x72",
19
- "type": "image\/png",
20
- "density": 1.5
21
- },
22
- {
23
- "src": "\/favicon-96.png",
24
- "sizes": "96x96",
25
- "type": "image\/png",
26
- "density": 2
27
- },
28
- {
29
- "src": "\/favicon-144.png",
30
- "sizes": "144x144",
31
- "type": "image\/png",
32
- "density": 3
33
- },
34
- {
35
- "src": "\/favicon-192.png",
36
- "sizes": "192x192",
37
- "type": "image\/png",
38
- "density": 4
39
- }
40
- ]
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/huggingface-avatar.jpeg DELETED
Binary file (8.14 kB)
 
public/icon.png CHANGED
public/mask.png DELETED
Binary file (5.81 kB)
 
public/next.svg DELETED
public/report.jpg DELETED
Binary file (46.1 kB)
 
public/vercel.svg DELETED
src/app/{server β†’ api}/actions/README.md RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/README.md RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/deleteFileFromDataset.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/deleteVideoRequest.ts RENAMED
@@ -2,7 +2,7 @@
2
  import { MediaInfo } from "@/types/general"
3
 
4
  import { deleteFileFromDataset } from "./deleteFileFromDataset"
5
- import { formatPromptFileName } from "../utils/formatPromptFileName"
6
 
7
  export async function deleteVideoRequest({
8
  video,
 
2
  import { MediaInfo } from "@/types/general"
3
 
4
  import { deleteFileFromDataset } from "./deleteFileFromDataset"
5
+ import { formatPromptFileName } from "../../utils/formatPromptFileName"
6
 
7
  export async function deleteVideoRequest({
8
  video,
src/app/{server β†’ api}/actions/ai-tube-hf/downloadClapProject.ts RENAMED
@@ -6,8 +6,8 @@ import { ChannelInfo, MediaInfo, VideoRequest } from "@/types/general"
6
  import { defaultVideoModel } from "@/app/config"
7
  import { parseClap } from "@/lib/clap/parseClap"
8
 
9
- import { parseVideoModelName } from "../utils/parseVideoModelName"
10
- import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
11
 
12
  import { downloadFileAsBlob } from "./downloadFileAsBlob"
13
 
 
6
  import { defaultVideoModel } from "@/app/config"
7
  import { parseClap } from "@/lib/clap/parseClap"
8
 
9
+ import { parseVideoModelName } from "../../utils/parseVideoModelName"
10
+ import { computeOrientationProjectionWidthHeight } from "../../utils/computeOrientationProjectionWidthHeight"
11
 
12
  import { downloadFileAsBlob } from "./downloadFileAsBlob"
13
 
src/app/{server β†’ api}/actions/ai-tube-hf/downloadFileAsBlob.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/downloadFileAsText.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/downloadPlainText.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/extendVideosWithStats.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getChannel.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getChannelVideos.ts RENAMED
@@ -6,7 +6,7 @@ import { getVideoRequestsFromChannel } from "./getVideoRequestsFromChannel"
6
  import { adminApiKey } from "../config"
7
  import { getVideoIndex } from "./getVideoIndex"
8
  import { extendVideosWithStats } from "./extendVideosWithStats"
9
- import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
10
  import { defaultVideoModel } from "@/app/config"
11
 
12
  // return
 
6
  import { adminApiKey } from "../config"
7
  import { getVideoIndex } from "./getVideoIndex"
8
  import { extendVideosWithStats } from "./extendVideosWithStats"
9
+ import { computeOrientationProjectionWidthHeight } from "../../utils/computeOrientationProjectionWidthHeight"
10
  import { defaultVideoModel } from "@/app/config"
11
 
12
  // return
src/app/{server β†’ api}/actions/ai-tube-hf/getChannels.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getCredentials.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getPrivateChannels.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getTags.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getVideo.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getVideoIndex.ts RENAMED
File without changes
src/app/{server β†’ api}/actions/ai-tube-hf/getVideoRequestsFromChannel.ts RENAMED
@@ -3,10 +3,10 @@
3
  import { ChannelInfo, VideoRequest } from "@/types/general"
4
  import { getCredentials } from "./getCredentials"
5
  import { listFiles } from "@/lib/huggingface/hub/src"
6
- import { parsePromptFileName } from "../utils/parsePromptFileName"
7
  import { downloadFileAsText } from "./downloadFileAsText"
8
- import { parseDatasetPrompt } from "../utils/parseDatasetPrompt"
9
- import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
10
  import { downloadClapProject } from "./downloadClapProject"
11
 
12
  /**
 
3
  import { ChannelInfo, VideoRequest } from "@/types/general"
4
  import { getCredentials } from "./getCredentials"
5
  import { listFiles } from "@/lib/huggingface/hub/src"
6
+ import { parsePromptFileName } from "../../utils/parsePromptFileName"
7
  import { downloadFileAsText } from "./downloadFileAsText"
8
+ import { parseDatasetPrompt } from "../../utils/parseDatasetPrompt"
9
+ import { computeOrientationProjectionWidthHeight } from "../../utils/computeOrientationProjectionWidthHeight"
10
  import { downloadClapProject } from "./downloadClapProject"
11
 
12
  /**
src/app/{server β†’ api}/actions/ai-tube-hf/getVideos.ts RENAMED
@@ -7,8 +7,8 @@ import { MediaInfo } from "@/types/general"
7
 
8
  import { getVideoIndex } from "./getVideoIndex"
9
  import { extendVideosWithStats } from "./extendVideosWithStats"
10
- import { isHighQuality } from "../utils/isHighQuality"
11
- import { isAntisocial } from "../utils/isAntisocial"
12
 
13
  const HARD_LIMIT = 100
14
 
@@ -19,7 +19,7 @@ export async function getVideos({
19
  niceToHaveTags = [],
20
  sortBy = "date",
21
  ignoreVideoIds = [],
22
- maxVideos = HARD_LIMIT,
23
  neverThrow = false,
24
  renewCache = true,
25
  }: {
@@ -42,7 +42,7 @@ export async function getVideos({
42
  // eg. videos already watched, or disliked etc
43
  ignoreVideoIds?: string[]
44
 
45
- maxVideos?: number
46
 
47
  neverThrow?: boolean
48
 
@@ -118,9 +118,9 @@ export async function getVideos({
118
  )
119
 
120
  // if we don't have enough videos
121
- if (videosMatchingFilters.length < maxVideos) {
122
  // count how many we need
123
- const nbMissingVideos = maxVideos - videosMatchingFilters.length
124
 
125
  // then we try to fill the gap with valid videos from other topics
126
  const videosToUseAsFiller = allPotentiallyValidVideos
@@ -138,7 +138,7 @@ export async function getVideos({
138
  const sanitizedVideos = videosMatchingFilters.filter(v => !isAntisocial(v))
139
 
140
  // we enforce the max limit of HARD_LIMIT (eg. 100)
141
- const limitedNumberOfVideos = sanitizedVideos.slice(0, Math.min(HARD_LIMIT, maxVideos))
142
 
143
  // we ask Redis for the freshest stats
144
  const videosWithStats = await extendVideosWithStats(limitedNumberOfVideos)
 
7
 
8
  import { getVideoIndex } from "./getVideoIndex"
9
  import { extendVideosWithStats } from "./extendVideosWithStats"
10
+ import { isHighQuality } from "../../utils/isHighQuality"
11
+ import { isAntisocial } from "../../utils/isAntisocial"
12
 
13
  const HARD_LIMIT = 100
14
 
 
19
  niceToHaveTags = [],
20
  sortBy = "date",
21
  ignoreVideoIds = [],
22
+ maxNbMedias = HARD_LIMIT,
23
  neverThrow = false,
24
  renewCache = true,
25
  }: {
 
42
  // eg. videos already watched, or disliked etc
43
  ignoreVideoIds?: string[]
44
 
45
+ maxNbMedias?: number
46
 
47
  neverThrow?: boolean
48
 
 
118
  )
119
 
120
  // if we don't have enough videos
121
+ if (videosMatchingFilters.length < maxNbMedias) {
122
  // count how many we need
123
+ const nbMissingVideos = maxNbMedias - videosMatchingFilters.length
124
 
125
  // then we try to fill the gap with valid videos from other topics
126
  const videosToUseAsFiller = allPotentiallyValidVideos
 
138
  const sanitizedVideos = videosMatchingFilters.filter(v => !isAntisocial(v))
139
 
140
  // we enforce the max limit of HARD_LIMIT (eg. 100)
141
+ const limitedNumberOfVideos = sanitizedVideos.slice(0, Math.min(HARD_LIMIT, maxNbMedias))
142
 
143
  // we ask Redis for the freshest stats
144
  const videosWithStats = await extendVideosWithStats(limitedNumberOfVideos)
src/app/{server β†’ api}/actions/ai-tube-hf/parseChannel.ts RENAMED
@@ -1,7 +1,7 @@
1
  "use server"
2
 
3
  import { Credentials, downloadFile, whoAmI } from "@/lib/huggingface/hub/src"
4
- import { parseDatasetReadme } from "@/app/server/actions/utils/parseDatasetReadme"
5
  import { ChannelInfo, VideoGenerationModel, VideoOrientation } from "@/types/general"
6
 
7
  import { adminCredentials } from "../config"
 
1
  "use server"
2
 
3
  import { Credentials, downloadFile, whoAmI } from "@/lib/huggingface/hub/src"
4
+ import { parseDatasetReadme } from "@/app/api/utils/parseDatasetReadme"
5
  import { ChannelInfo, VideoGenerationModel, VideoOrientation } from "@/types/general"
6
 
7
  import { adminCredentials } from "../config"
src/app/{server β†’ api}/actions/ai-tube-hf/uploadVideoRequestToDataset.ts RENAMED
@@ -4,8 +4,8 @@ import { Blob } from "buffer"
4
 
5
  import { Credentials, uploadFile, whoAmI } from "@/lib/huggingface/hub/src"
6
  import { ChannelInfo, VideoGenerationModel, MediaInfo, VideoOrientation, VideoRequest } from "@/types/general"
7
- import { formatPromptFileName } from "../utils/formatPromptFileName"
8
- import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
9
 
10
  /**
11
  * Save the video request to the user's own dataset
 
4
 
5
  import { Credentials, uploadFile, whoAmI } from "@/lib/huggingface/hub/src"
6
  import { ChannelInfo, VideoGenerationModel, MediaInfo, VideoOrientation, VideoRequest } from "@/types/general"
7
+ import { formatPromptFileName } from "../../utils/formatPromptFileName"
8
+ import { computeOrientationProjectionWidthHeight } from "../../utils/computeOrientationProjectionWidthHeight"
9
 
10
  /**
11
  * Save the video request to the user's own dataset