Spaces:
Configuration error
Configuration error
Upload 51 files
Browse files
src/components/MultiSourceCaptioningView.tsx
CHANGED
|
@@ -6,7 +6,7 @@ const MODES = ["Webcam", "URL", "File"] as const;
|
|
| 6 |
type Mode = typeof MODES[number];
|
| 7 |
|
| 8 |
const EXAMPLE_VIDEO_URL = "/space/videos/1.mp4";
|
| 9 |
-
const EXAMPLE_PROMPT = "Detect all birds in the image. For each bird, output a JSON array of objects with fields: 'label' (string) and 'bbox_2d' ([x1, y1, x2, y2]) where coordinates are in pixel values. This is only an example use your own values (Do not use these values [100, 50, 200, 300]
|
| 10 |
|
| 11 |
function parseFlatBoxArray(arr: any[]): { label: string, bbox_2d: number[] }[] {
|
| 12 |
if (typeof arr[0] === "string" && Array.isArray(arr[1])) {
|
|
|
|
| 6 |
type Mode = typeof MODES[number];
|
| 7 |
|
| 8 |
const EXAMPLE_VIDEO_URL = "/space/videos/1.mp4";
|
| 9 |
+
const EXAMPLE_PROMPT = "Detect all birds in the image. For each bird, output a JSON array of objects with fields: 'label' (string) and 'bbox_2d' ([x1, y1, x2, y2]) where coordinates are in pixel values. This is only an example use your own values (Do not use these values [100, 50, 200, 300]) Example: [{\"label\": \"bird\", \"bbox_2d\": [100, 50, 200, 300]}]";
|
| 10 |
|
| 11 |
function parseFlatBoxArray(arr: any[]): { label: string, bbox_2d: number[] }[] {
|
| 12 |
if (typeof arr[0] === "string" && Array.isArray(arr[1])) {
|