Spaces:
Running
Running
Clamp preset values to expression slider range [-3,3]
Browse files
app.py
CHANGED
|
@@ -610,17 +610,18 @@ with gr.Blocks(title="GNM Head") as demo:
|
|
| 610 |
|
| 611 |
# Expression slider slots (flat order): left eye 0-2, right eye 3-5,
|
| 612 |
# mouth 6-12, tongue 13-16 (13=tongue_mean, 14-16=tongue_000..002),
|
| 613 |
-
# pupil dilation 17.
|
|
|
|
| 614 |
# mouth slot 6 negative -> jaw drops / mouth opens
|
| 615 |
# tongue slot 14 positive + tongue_mean slot 13 negative -> tongue out
|
| 616 |
# eye slot 0 (left) / slot 3 (right): positive -> eye wide, negative -> closed
|
| 617 |
presets = [
|
| 618 |
# 1) Open mouth with the tongue sticking out.
|
| 619 |
-
_preset(expression={6: -
|
| 620 |
# 2) Surprised: eyes wide open + mouth dropped open.
|
| 621 |
-
_preset(expression={0:
|
| 622 |
# 3) Wink: left eye closed, right eye left neutral.
|
| 623 |
-
_preset(expression={0: -
|
| 624 |
]
|
| 625 |
|
| 626 |
gr.Examples(
|
|
|
|
| 610 |
|
| 611 |
# Expression slider slots (flat order): left eye 0-2, right eye 3-5,
|
| 612 |
# mouth 6-12, tongue 13-16 (13=tongue_mean, 14-16=tongue_000..002),
|
| 613 |
+
# pupil dilation 17. Expression sliders are clamped to [-3, 3].
|
| 614 |
+
# Measured directions on this model:
|
| 615 |
# mouth slot 6 negative -> jaw drops / mouth opens
|
| 616 |
# tongue slot 14 positive + tongue_mean slot 13 negative -> tongue out
|
| 617 |
# eye slot 0 (left) / slot 3 (right): positive -> eye wide, negative -> closed
|
| 618 |
presets = [
|
| 619 |
# 1) Open mouth with the tongue sticking out.
|
| 620 |
+
_preset(expression={6: -3.0, 13: -3.0, 14: 3.0}),
|
| 621 |
# 2) Surprised: eyes wide open + mouth dropped open.
|
| 622 |
+
_preset(expression={0: 3.0, 3: 3.0, 6: -3.0}),
|
| 623 |
# 3) Wink: left eye closed, right eye left neutral.
|
| 624 |
+
_preset(expression={0: -3.0}),
|
| 625 |
]
|
| 626 |
|
| 627 |
gr.Examples(
|