t2av_eval / README.md
Youngsun's picture
T2AV eval site: guideline to training to eval, dghadiya storage
44e5f85
|
Raw
History Blame Contribute Delete
2.07 kB
---
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 in the `dghadiya` namespace (the token must belong to,
or be added as a collaborator on, that account — see note below).
3. Optional: set `HF_ANNOTATIONS_DATASET_REPO` if you want to use a dataset
repo other than `dghadiya/t2av_eval_annotations`. Optional: set
`HF_VIDEO_DATASET_REPO` if the evaluation videos move to a different
dataset repo (default `dghadiya/T2AV_TemporalConstraint`; this one is
public, so no token is required just to read it).
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.
Note: `HF_TOKEN` must belong to (or have write access on) whatever account
owns `HF_ANNOTATIONS_DATASET_REPO` — a token cannot create or write repos in a
namespace its owner doesn't control. To check which account a token belongs
to: `python -c "from huggingface_hub import HfApi; print(HfApi().whoami(token='hf_...'))"`.
## 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