Spaces:
Sleeping
Sleeping
Changes made to the website
Browse files- README.md +43 -18
- app.py +0 -0
- requirements.txt +26 -11
README.md
CHANGED
|
@@ -1,26 +1,51 @@
|
|
| 1 |
---
|
| 2 |
title: SceneSolver
|
| 3 |
-
|
|
|
|
|
|
|
| 4 |
sdk: gradio
|
| 5 |
-
sdk_version:
|
|
|
|
| 6 |
app_file: app.py
|
| 7 |
-
|
| 8 |
-
short_description:
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# SceneSolver
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: SceneSolver
|
| 3 |
+
emoji: π΅οΈ
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: "4.44.0"
|
| 8 |
+
python_version: "3.10"
|
| 9 |
app_file: app.py
|
| 10 |
+
pinned: false
|
| 11 |
+
short_description: Nine-stage forensic video analysis agent (SceneSolver)
|
| 12 |
+
suggested_hardware: zero-a10g
|
| 13 |
---
|
| 14 |
|
| 15 |
# SceneSolver
|
| 16 |
|
| 17 |
+
A nine-stage forensic video analysis pipeline (AutoEncoder anomaly signal,
|
| 18 |
+
TimeSformer binary + multi-class classification, YOLO weapon detection, audio
|
| 19 |
+
feature extraction, motion tracking, a fusion reasoning layer, an RL3033
|
| 20 |
+
temporal-reasoning agent, and a LLaVA-based contextual explanation stage),
|
| 21 |
+
wrapped in a Gradio interface with an agentic "Sherl0ck" escalation layer.
|
| 22 |
+
|
| 23 |
+
Model assets: `samxkevin/scenesolver-assets` (pipeline weights) and
|
| 24 |
+
`samxkevin/SceneDescriptionModel` (the VLM used by Stage 8 / LLaVA).
|
| 25 |
+
|
| 26 |
+
## Running on ZeroGPU β before you deploy
|
| 27 |
+
|
| 28 |
+
- **Creating** a ZeroGPU Space requires a Hugging Face **PRO** personal account
|
| 29 |
+
or a Team/Enterprise organization. (Anyone can *use* a public ZeroGPU Space
|
| 30 |
+
for free once it exists β the PRO/Enterprise requirement is only for the
|
| 31 |
+
owner who creates it.)
|
| 32 |
+
- Setting `suggested_hardware: zero-a10g` above is a display hint only. You
|
| 33 |
+
still need to explicitly select **ZeroGPU** in the Space's
|
| 34 |
+
**Settings β Hardware** panel for it to actually run there.
|
| 35 |
+
- `COHERE_API_KEY` must be set as a **repository secret**
|
| 36 |
+
(Settings β Variables and secrets) β it is read from the environment and is
|
| 37 |
+
no longer hardcoded in the source (see the security note below).
|
| 38 |
+
- The `@spaces.GPU(duration=300)` timeout on the Analyse pipeline is a
|
| 39 |
+
starting estimate covering AutoEncoder + TimeSformer (x2) + YOLO + audio +
|
| 40 |
+
tracking + fusion + RL3033 + optional LLaVA. Watch the Space logs after the
|
| 41 |
+
first real run and raise/lower `duration` in `app.py` to match observed
|
| 42 |
+
runtime.
|
| 43 |
+
- Verify `samxkevin/scenesolver-assets` and `samxkevin/SceneDescriptionModel`
|
| 44 |
+
are public repos. If either is private, add an `HF_TOKEN` repository secret
|
| 45 |
+
with read access, or the Space will fail to download weights at startup.
|
| 46 |
+
|
| 47 |
+
## Security note
|
| 48 |
+
|
| 49 |
+
The uploaded source notebook contained a hardcoded, live Cohere API key. It
|
| 50 |
+
has been removed from this port. **That key should be rotated in the Cohere
|
| 51 |
+
dashboard**, since it was exposed in plaintext in the original file.
|
app.py
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
requirements.txt
CHANGED
|
@@ -1,20 +1,35 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
opencv-python-headless
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
transformers>=4.45
|
| 9 |
-
accelerate
|
| 10 |
-
safetensors
|
| 11 |
Pillow
|
| 12 |
tqdm
|
| 13 |
-
|
| 14 |
reportlab
|
|
|
|
| 15 |
stable-baselines3
|
| 16 |
ultralytics
|
| 17 |
lap
|
|
|
|
| 18 |
librosa
|
| 19 |
-
|
|
|
|
| 20 |
cohere>=5.0.0
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SceneSolver β Hugging Face Space (ZeroGPU) requirements
|
| 2 |
+
# Derived directly from the imports actually used in app.py (source: NewChecker.ipynb).
|
| 3 |
+
# NOTE: torch/torchvision versions should be checked against the current
|
| 4 |
+
# ZeroGPU CUDA build before first deploy β see
|
| 5 |
+
# https://huggingface.co/docs/hub/spaces-zerogpu (the backing GPU/CUDA image
|
| 6 |
+
# changes over time, and torch must match the wheel it was built against).
|
| 7 |
+
|
| 8 |
+
spaces
|
| 9 |
+
gradio>=4.44.0
|
| 10 |
+
|
| 11 |
+
torch>=2.1.0
|
| 12 |
+
torchvision>=0.16.0
|
| 13 |
+
|
| 14 |
+
transformers>=4.40.0
|
| 15 |
+
huggingface_hub>=0.23.0
|
| 16 |
+
|
| 17 |
opencv-python-headless
|
| 18 |
+
numpy
|
| 19 |
+
matplotlib
|
|
|
|
|
|
|
|
|
|
| 20 |
Pillow
|
| 21 |
tqdm
|
| 22 |
+
|
| 23 |
reportlab
|
| 24 |
+
|
| 25 |
stable-baselines3
|
| 26 |
ultralytics
|
| 27 |
lap
|
| 28 |
+
|
| 29 |
librosa
|
| 30 |
+
soundfile
|
| 31 |
+
|
| 32 |
cohere>=5.0.0
|
| 33 |
+
liquid-audio
|
| 34 |
+
|
| 35 |
+
requests
|