TrungTran commited on
Commit
b20ec2d
Β·
verified Β·
1 Parent(s): 5a621f1

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -1,8 +1,8 @@
1
  """
2
- FaceAge-DINOv3 β€” Gradio demo for HuggingFace Spaces.
3
 
4
  Face detection : YuNet (OpenCV built-in, ~350 KB model, no extra deps)
5
- Age/gender : FaceAge-DINOv3 ONNX (CPU, ~1.2 GB)
6
  """
7
  import os
8
  import numpy as np
@@ -60,7 +60,7 @@ def _load_age_model():
60
 
61
  print("[AgeModel] Downloading ONNX from HuggingFace Hub …")
62
  onnx_path = hf_hub_download(
63
- repo_id = "TrungTran/faceage-dino",
64
  filename = "faceage_dino_fp32.onnx",
65
  token = _HF_TOKEN,
66
  )
@@ -269,9 +269,9 @@ def predict(image: Image.Image, max_faces: int,
269
  # ---------------------------------------------------------------------------
270
 
271
  _DESC = """
272
- ## FaceAge-DINOv3 β€” Age & Gender Estimation
273
 
274
- Upload a photo. **YuNet** auto-detects faces, then **FaceAge-DINOv3** predicts age and gender.
275
 
276
  | | |
277
  |--|--|
@@ -280,10 +280,10 @@ Upload a photo. **YuNet** auto-detects faces, then **FaceAge-DINOv3** predicts a
280
  | ⚑ Speed | ~100 ms / face on CPU (ONNX FP32) |
281
  | πŸ” Detector | YuNet (OpenCV, ~350 KB) |
282
 
283
- [πŸ“„ Model Card](https://huggingface.co/TrungTran/faceage-dino)
284
  """
285
 
286
- with gr.Blocks(title="FaceAge-DINOv3", theme=gr.themes.Soft()) as demo:
287
  gr.Markdown(_DESC)
288
 
289
  with gr.Row():
 
1
  """
2
+ FaceAge ClientScan β€” Gradio demo for HuggingFace Spaces.
3
 
4
  Face detection : YuNet (OpenCV built-in, ~350 KB model, no extra deps)
5
+ Age/gender : FaceAge ClientScan ONNX (CPU, ~1.2 GB)
6
  """
7
  import os
8
  import numpy as np
 
60
 
61
  print("[AgeModel] Downloading ONNX from HuggingFace Hub …")
62
  onnx_path = hf_hub_download(
63
+ repo_id = "TrungTran/faceage-clientscan",
64
  filename = "faceage_dino_fp32.onnx",
65
  token = _HF_TOKEN,
66
  )
 
269
  # ---------------------------------------------------------------------------
270
 
271
  _DESC = """
272
+ ## FaceAge ClientScan β€” Age & Gender Estimation
273
 
274
+ Upload a photo. **YuNet** auto-detects faces, then **FaceAge ClientScan** predicts age and gender.
275
 
276
  | | |
277
  |--|--|
 
280
  | ⚑ Speed | ~100 ms / face on CPU (ONNX FP32) |
281
  | πŸ” Detector | YuNet (OpenCV, ~350 KB) |
282
 
283
+ [πŸ“„ Model Card](https://huggingface.co/TrungTran/faceage-clientscan)
284
  """
285
 
286
+ with gr.Blocks(title="FaceAge ClientScan", theme=gr.themes.Soft()) as demo:
287
  gr.Markdown(_DESC)
288
 
289
  with gr.Row():