Quazim0t0 commited on
Commit
09dd50d
·
verified ·
1 Parent(s): b5e736c

Upload 51 files

Browse files
README.md CHANGED
@@ -1,13 +1,13 @@
1
- ---
2
- title: FastVLMBoxes (Use File Upload, Not Webcam)
3
- emoji: 📈
4
- colorFrom: purple
5
- colorTo: pink
6
- sdk: static
7
- pinned: false
8
- app_build_command: npm run build
9
- app_file: dist/index.html
10
- short_description: Real-time video boxing powered by FastVLM
11
- ---
12
-
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ ---
2
+ title: FastVLM WebGPU
3
+ emoji: 🍎
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: static
7
+ pinned: false
8
+ app_build_command: npm run build
9
+ app_file: dist/index.html
10
+ short_description: Real-time video captioning powered by FastVLM
11
+ ---
12
+
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
src/components/MultiSourceCaptioningView.tsx CHANGED
@@ -2,11 +2,11 @@ import { useState, useRef, useEffect } from "react";
2
  import { useVLMContext } from "../context/useVLMContext";
3
  import { drawBoundingBoxesOnCanvas } from "./BoxAnnotator";
4
 
5
- const MODES = ["Webcam", "File"] as const;
6
  type Mode = typeof MODES[number];
7
 
8
  const EXAMPLE_VIDEO_URL = "/space/videos/1.mp4";
9
- const EXAMPLE_PROMPT = "Detect each individual bird in the image. The birds are moving. For each object, output a JSON array of objects with fields. Each bird should have its own ([x1, y1, x2, y2]) where coordinates are in pixel values. This should be used to draw a box using the points around the bird. Follow the format of this Example: [x1, y1, x2, y2], [x1, y1, x2, y2]";
10
 
11
  function isImageFile(file: File) {
12
  return file.type.startsWith("image/");
 
2
  import { useVLMContext } from "../context/useVLMContext";
3
  import { drawBoundingBoxesOnCanvas } from "./BoxAnnotator";
4
 
5
+ const MODES = ["File"] as const;
6
  type Mode = typeof MODES[number];
7
 
8
  const EXAMPLE_VIDEO_URL = "/space/videos/1.mp4";
9
+ const EXAMPLE_PROMPT = "Detect each individual animated characters in the image. The characters are moving. For each character, output a JSON array of objects with fields. Each character should have its own ([x1, y1, x2, y2]) where coordinates are in pixel values. No coordinates should be the same. This should be used to draw a box using the points around the character. This is an example of two boxes, the format of this : [x1, y1, x2, y2], [x1, y1, x2, y2]";
10
 
11
  function isImageFile(file: File) {
12
  return file.type.startsWith("image/");