File size: 1,402 Bytes
49c84ff
2159212
 
 
49c84ff
2159212
49c84ff
 
2159212
 
 
3b2e747
 
2159212
 
 
 
3b2e747
 
 
 
 
2159212
 
 
 
 
 
3b2e747
2159212
 
3b2e747
 
 
 
2159212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: T2AV Eval UI
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
---

# Video Evaluation UI

This app is configured to deploy as a Hugging Face Docker Space. The Docker
build compiles the Vite frontend, serves it from FastAPI, and stores each
annotation as a JSON file in a Hugging Face Dataset repo.

## Hugging Face Space Deployment

1. Create a new Space on Hugging Face and choose Docker as the SDK.
2. Add a Space secret named `HF_TOKEN` with a Hugging Face token that has write
   access to datasets.
3. Optional: set `HF_ANNOTATIONS_DATASET` if you want to use a dataset repo
   other than `adinayak/t2av_eval_annotations`.
4. Add this repository as the Space repository or push it to the Space remote:

```bash
git remote add hf https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
git push hf main
```

5. Hugging Face will build the root `Dockerfile` and expose the app on port
   `7860`.

The backend creates the annotation dataset repo on first save if it does not
already exist. By default it creates the dataset as private. Set
`HF_ANNOTATIONS_DATASET_PRIVATE=false` to create a public dataset instead.

## Backend

cd backend

pip install -r requirements.txt

uvicorn main:app --reload

Backend runs at:
http://localhost:8000

Health check:
http://localhost:8000/health

## Frontend

cd frontend

npm install

npm run dev

Frontend runs at:
http://localhost:5173