multimodalart HF Staff commited on
Commit
afa2e6b
·
verified ·
1 Parent(s): 7c5dba1

Replace example presets: open-mouth+tongue, surprised, wink

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -512,13 +512,19 @@ with gr.Blocks(title="GNM Head") as demo:
512
  row[_TR0 + i] = v
513
  return row
514
 
 
 
 
 
 
 
515
  presets = [
516
- _preset(), # neutral template face
517
- _preset(identity={0: 2.5, 1: -2.0, 2: 1.5, 4: -1.5}), # identity A
518
- _preset(identity={0: -2.5, 3: 2.0, 5: -1.8, 6: 1.5}), # identity B
519
- # Pose: neck Y (index 1), head X (index 3), gaze X (index 6).
520
- _preset(pose={1: 35, 3: -15, 6: 15}), # looking aside
521
- _preset(pose={0: -25, 4: 20}), # looking down/up
522
  ]
523
 
524
  gr.Examples(
 
512
  row[_TR0 + i] = v
513
  return row
514
 
515
+ # Expression slider slots (flat order): left eye 0-2, right eye 3-5,
516
+ # mouth 6-12, tongue 13-16 (13=tongue_mean, 14-16=tongue_000..002),
517
+ # pupil dilation 17. Measured directions on this model:
518
+ # mouth slot 6 negative -> jaw drops / mouth opens
519
+ # tongue slot 14 positive + tongue_mean slot 13 negative -> tongue out
520
+ # eye slot 0 (left) / slot 3 (right): positive -> eye wide, negative -> closed
521
  presets = [
522
+ # 1) Open mouth with the tongue sticking out.
523
+ _preset(expression={6: -5.0, 13: -3.0, 14: 3.0}),
524
+ # 2) Surprised: eyes wide open + mouth dropped open.
525
+ _preset(expression={0: 4.0, 3: 4.0, 6: -3.0}),
526
+ # 3) Wink: left eye closed, right eye left neutral.
527
+ _preset(expression={0: -5.0}),
528
  ]
529
 
530
  gr.Examples(