Spaces:
Running
Running
Update apps/viralcat.js
Browse files- apps/viralcat.js +1 -1
apps/viralcat.js
CHANGED
|
@@ -13,7 +13,7 @@ const upload = multer({ storage: multer.memoryStorage(), limits: { fileSize: 100
|
|
| 13 |
// ── 🚨 NEW: FRAME SAMPLING LOGIC ──
|
| 14 |
// Models like Maverick crash if you send too many images.
|
| 15 |
// This picks a max of 16 frames spread evenly across the video.
|
| 16 |
-
const sampleFrames = (frames, max =
|
| 17 |
if (frames.length <= max) return frames;
|
| 18 |
const step = frames.length / max;
|
| 19 |
const sampled = [];
|
|
|
|
| 13 |
// ── 🚨 NEW: FRAME SAMPLING LOGIC ──
|
| 14 |
// Models like Maverick crash if you send too many images.
|
| 15 |
// This picks a max of 16 frames spread evenly across the video.
|
| 16 |
+
const sampleFrames = (frames, max = 6) => {
|
| 17 |
if (frames.length <= max) return frames;
|
| 18 |
const step = frames.length / max;
|
| 19 |
const sampled = [];
|