Spaces:
Running
Running
Upload 51 files
Browse files- README.md +12 -12
- src/components/MultiSourceCaptioningView.tsx +2 -2
README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
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
|
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 = ["
|
6 |
type Mode = typeof MODES[number];
|
7 |
|
8 |
const EXAMPLE_VIDEO_URL = "/space/videos/1.mp4";
|
9 |
-
const EXAMPLE_PROMPT = "Detect each individual
|
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/");
|