FanLR commited on
Commit
b2c4e15
·
verified ·
1 Parent(s): 8aeaae5

Remove XPENG branding and show disabled Video media option

Browse files

Remove the XPENG logo from the demo sidebar. Add a grey, disabled Video option beside the active Image option, with responsive spacing. Update the existing font check and UI release lock. Verified locally: 28 related checks passed; rendered page has no XPENG branding and Video is disabled.

app.py CHANGED
@@ -296,10 +296,6 @@ gradio-app:has(#console) footer:not(.studio-footer) { display:none!important; }
296
  @media(max-width:430px) { gradio-app:has(#console) .gradio-container { padding:12px 10px!important; } }
297
  </style>"""
298
  JS = (ROOT / "assets" / "console.js").read_text(encoding="utf-8")
299
- LOGO = (
300
- "data:image/png;base64,"
301
- + base64.b64encode((ROOT / "assets" / "xpeng-logo.png").read_bytes()).decode()
302
- )
303
  first_route = "grounding"
304
  first_case = BY_ROUTE[first_route][2]
305
 
@@ -325,16 +321,17 @@ with gr.Blocks(
325
  with gr.Column(scale=3, min_width=280, elem_id="controls"):
326
  gr.HTML(
327
  """<div class="control-brand">
328
- <img class="xpeng-logo" src="__XPENG_LOGO__" alt="XPENG" width="180" height="46"/>
329
  <h2>Grounding<span>PI</span></h2>
330
  <p>Visual primitives for physical intelligence.</p>
331
- </div>""".replace("__XPENG_LOGO__", LOGO)
332
  )
333
  with gr.Column(elem_id="control-settings"):
334
  with gr.Row(elem_id="control-fields"):
335
  gr.HTML(
336
  """<div class="media-field"><span>Media Type</span><div>
337
- <span>Image</span></div></div>""",
 
 
338
  elem_id="media-type",
339
  )
340
  route = gr.Dropdown(
 
296
  @media(max-width:430px) { gradio-app:has(#console) .gradio-container { padding:12px 10px!important; } }
297
  </style>"""
298
  JS = (ROOT / "assets" / "console.js").read_text(encoding="utf-8")
 
 
 
 
299
  first_route = "grounding"
300
  first_case = BY_ROUTE[first_route][2]
301
 
 
321
  with gr.Column(scale=3, min_width=280, elem_id="controls"):
322
  gr.HTML(
323
  """<div class="control-brand">
 
324
  <h2>Grounding<span>PI</span></h2>
325
  <p>Visual primitives for physical intelligence.</p>
326
+ </div>"""
327
  )
328
  with gr.Column(elem_id="control-settings"):
329
  with gr.Row(elem_id="control-fields"):
330
  gr.HTML(
331
  """<div class="media-field"><span>Media Type</span><div>
332
+ <span class="media-option is-active">Image</span>
333
+ <button class="media-option" type="button" disabled
334
+ title="Video is not available">Video</button></div></div>""",
335
  elem_id="media-type",
336
  )
337
  route = gr.Dropdown(
assets/studio.css CHANGED
@@ -3,15 +3,16 @@
3
  #controls {flex:0 0 286px!important;min-width:0!important;width:286px;padding:24px!important;gap:20px!important;background:#fcfbfe}
4
  .control-brand {container-type:inline-size;gap:12px}
5
  .control-brand h2 {font-size:clamp(26px,14cqw,38px);white-space:nowrap;line-height:1.15;letter-spacing:-.045em}
6
- .control-brand .xpeng-logo {width:176px;max-width:80%;height:auto}
7
  .control-brand p {font-size:12px;line-height:1.65}
8
  #control-settings {padding:12px!important;gap:12px!important}
9
  #control-fields {flex-direction:column!important;gap:10px!important}
10
  #control-fields>.form {width:100%!important;flex:0 0 auto!important}
11
  #media-type {flex:0 0 auto!important}
12
  .media-field {display:flex;align-items:center;justify-content:space-between;gap:12px}
13
- .media-field>span {margin:0!important}.media-field>div {height:28px;background:none;border:0;padding:0}
14
- .media-field>div>span {min-width:0;background:#edf3e2;color:#4c681c;box-shadow:none;font-size:11px;padding:0 10px}
 
 
15
  #run-button {margin-top:0!important;min-height:48px!important;border-radius:8px!important;box-shadow:none!important;font-size:14px!important}
16
  #service-panel {gap:2px!important;margin-top:0!important}
17
  .api-status small {font-size:11px}
@@ -70,19 +71,18 @@
70
  .detail-image {height:170px}.evidence-detail {max-width:none}
71
  #prompt-console,#output-console {box-shadow:none!important;padding:12px 18px!important}
72
  .studio-header {padding-bottom:18px}.studio-header h1 {font-size:30px}
73
- @media(min-width:1500px){#controls {flex-basis:310px!important;width:310px;padding:28px!important}.control-brand .xpeng-logo {width:190px}#visual-stage {--stage-gutter:32px}#stage-image {height:clamp(420px,50vh,580px)!important}}
74
  @media(max-width:1100px){#controls {flex-basis:246px!important;width:246px;padding:18px!important}.control-brand h2 {font-size:14cqw}#visual-stage {--stage-gutter:18px}#stage-image {height:clamp(300px,40vw,440px)!important}.header-scope {display:none}#review-row {flex-wrap:wrap!important}#sandbox-panel {flex:1 1 34%!important}#review-summary {flex:1 1 58%!important}}
75
  @media(max-width:760px){
76
  .studio-header h1 {font-size:25px}.header-description {font-size:12px}
77
  #controls {width:100%;flex:0 0 auto!important;padding:16px!important;gap:12px!important}
78
  .control-brand {container-type:normal;gap:10px;flex-wrap:nowrap}
79
  .control-brand h2 {font-size:clamp(22px,6vw,30px);white-space:nowrap}
80
- .control-brand .xpeng-logo {width:96px;max-width:30%}
81
  #control-settings {padding:0!important;border:0!important;gap:10px!important}
82
  #control-fields {flex-direction:row!important;align-items:center;gap:16px!important}
83
  #control-fields>.form {width:0!important;flex:1 1 0!important}
84
- #media-type {flex:0 0 30%!important}.media-field {display:block}.media-field>span {margin-bottom:7px!important}
85
- .media-field>div {height:39px}.media-field>div>span {min-width:60px}
86
  #service-panel {padding-top:6px!important}.api-status small,.connection-detail {display:none}
87
  #service-panel #health-button {min-height:28px!important;font-size:11px!important}
88
  #visual-stage {--stage-gutter:14px}
 
3
  #controls {flex:0 0 286px!important;min-width:0!important;width:286px;padding:24px!important;gap:20px!important;background:#fcfbfe}
4
  .control-brand {container-type:inline-size;gap:12px}
5
  .control-brand h2 {font-size:clamp(26px,14cqw,38px);white-space:nowrap;line-height:1.15;letter-spacing:-.045em}
 
6
  .control-brand p {font-size:12px;line-height:1.65}
7
  #control-settings {padding:12px!important;gap:12px!important}
8
  #control-fields {flex-direction:column!important;gap:10px!important}
9
  #control-fields>.form {width:100%!important;flex:0 0 auto!important}
10
  #media-type {flex:0 0 auto!important}
11
  .media-field {display:flex;align-items:center;justify-content:space-between;gap:12px}
12
+ .media-field>span {margin:0!important}.media-field>div {height:28px;background:none;border:0;padding:0;gap:4px}
13
+ .media-field>div>.media-option {display:grid;place-items:center;min-width:0;height:28px;margin:0;padding:0 10px;border:1px solid transparent;border-radius:6px;box-shadow:none;font:800 11px var(--ui)}
14
+ .media-field .is-active {background:#edf3e2;color:#4c681c}
15
+ .media-field .media-option:disabled {background:#f2f0f5;border-color:#e5e0ea;color:#96909e;opacity:1;cursor:not-allowed}
16
  #run-button {margin-top:0!important;min-height:48px!important;border-radius:8px!important;box-shadow:none!important;font-size:14px!important}
17
  #service-panel {gap:2px!important;margin-top:0!important}
18
  .api-status small {font-size:11px}
 
71
  .detail-image {height:170px}.evidence-detail {max-width:none}
72
  #prompt-console,#output-console {box-shadow:none!important;padding:12px 18px!important}
73
  .studio-header {padding-bottom:18px}.studio-header h1 {font-size:30px}
74
+ @media(min-width:1500px){#controls {flex-basis:310px!important;width:310px;padding:28px!important}#visual-stage {--stage-gutter:32px}#stage-image {height:clamp(420px,50vh,580px)!important}}
75
  @media(max-width:1100px){#controls {flex-basis:246px!important;width:246px;padding:18px!important}.control-brand h2 {font-size:14cqw}#visual-stage {--stage-gutter:18px}#stage-image {height:clamp(300px,40vw,440px)!important}.header-scope {display:none}#review-row {flex-wrap:wrap!important}#sandbox-panel {flex:1 1 34%!important}#review-summary {flex:1 1 58%!important}}
76
  @media(max-width:760px){
77
  .studio-header h1 {font-size:25px}.header-description {font-size:12px}
78
  #controls {width:100%;flex:0 0 auto!important;padding:16px!important;gap:12px!important}
79
  .control-brand {container-type:normal;gap:10px;flex-wrap:nowrap}
80
  .control-brand h2 {font-size:clamp(22px,6vw,30px);white-space:nowrap}
 
81
  #control-settings {padding:0!important;border:0!important;gap:10px!important}
82
  #control-fields {flex-direction:row!important;align-items:center;gap:16px!important}
83
  #control-fields>.form {width:0!important;flex:1 1 0!important}
84
+ #media-type {flex:0 0 auto!important}.media-field {display:block}.media-field>span {margin-bottom:7px!important}
85
+ .media-field>div {height:39px}.media-field>div>.media-option {min-width:52px;height:36px}
86
  #service-panel {padding-top:6px!important}.api-status small,.connection-detail {display:none}
87
  #service-panel #health-button {min-height:28px!important;font-size:11px!important}
88
  #visual-stage {--stage-gutter:14px}
docs/ui_case_pool_22_lock.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "files": {
3
- "app.py": "2c98f90cb32f908dd94012d7ee2261c3a5097c33a65b06150fff68b60aa4f417",
4
  "assets/Manrope-OFL.txt": "e01b637272e0cbdfb240184dd98ea5cc671556d9894dae2668d92ab2c906787c",
5
  "assets/Manrope-variable.ttf": "d0639be45d0af36e798172419d7bd173c4bd4f29e2b76cbb69db1d11bf8b0a40",
6
  "assets/SOURCES.md": "3cceb52136b55f86840e9585e3c37faed1adc762452b0fea50aecba696dac7fa",
@@ -8,7 +8,7 @@
8
  "assets/frosted.css": "393bf5f1c04a49a6e9b17e855e573646489b4add85bc7973eb6bb277686b5c80",
9
  "assets/original.css": "7a244c7f65e40797850dcde7d6b6505b1b5de60aa24b129f44b33ae52291fd2e",
10
  "assets/paper.css": "61fc60bf8c379a0894fbfe06574964ec2ed256791a23860fa4dbb872eb2869f9",
11
- "assets/studio.css": "dcc22a94afbcff8079c5bcaeda2849f75e6ad7b204af9a49f2c3d954c3df46cd",
12
  "assets/xpeng-logo.png": "ff0db78ddf8f9a122eec74e8eb79581f8e5dbc46803dddeb780a06f5ae295750",
13
  "cases/dense/04_dense_round2_gam_dense200_66.jpg": "c12e0a9cfce7f78ec2f95cff4ae7203da8e8db8c382b9818ed0e8463aaa84c01",
14
  "cases/dense/05_dense_round2_gam_dense200_77.jpg": "8a1b5031cd6d3f066cc84c99bd1e272994ebb0989f77dd3e978d2acc888cc6b6",
 
1
  {
2
  "files": {
3
+ "app.py": "716e6f9c4cf8ac9b9ac7c253c127985f249c248feae0523dd740cc60bec4a039",
4
  "assets/Manrope-OFL.txt": "e01b637272e0cbdfb240184dd98ea5cc671556d9894dae2668d92ab2c906787c",
5
  "assets/Manrope-variable.ttf": "d0639be45d0af36e798172419d7bd173c4bd4f29e2b76cbb69db1d11bf8b0a40",
6
  "assets/SOURCES.md": "3cceb52136b55f86840e9585e3c37faed1adc762452b0fea50aecba696dac7fa",
 
8
  "assets/frosted.css": "393bf5f1c04a49a6e9b17e855e573646489b4add85bc7973eb6bb277686b5c80",
9
  "assets/original.css": "7a244c7f65e40797850dcde7d6b6505b1b5de60aa24b129f44b33ae52291fd2e",
10
  "assets/paper.css": "61fc60bf8c379a0894fbfe06574964ec2ed256791a23860fa4dbb872eb2869f9",
11
+ "assets/studio.css": "e3406eb85fd042d1ec41eaec3e53d32bda8a71ed9ed1ab2ebdc841869a4cf816",
12
  "assets/xpeng-logo.png": "ff0db78ddf8f9a122eec74e8eb79581f8e5dbc46803dddeb780a06f5ae295750",
13
  "cases/dense/04_dense_round2_gam_dense200_66.jpg": "c12e0a9cfce7f78ec2f95cff4ae7203da8e8db8c382b9818ed0e8463aaa84c01",
14
  "cases/dense/05_dense_round2_gam_dense200_77.jpg": "8a1b5031cd6d3f066cc84c99bd1e272994ebb0989f77dd3e978d2acc888cc6b6",
tests/test_console.py CHANGED
@@ -142,8 +142,7 @@ class ConsoleTest(unittest.TestCase):
142
  self.assertEqual(states[-1][3], "[]")
143
  self.assertEqual(len(states[-1]), 7)
144
 
145
- def test_brand_and_fonts_are_self_contained(self):
146
- self.assertTrue(app.LOGO.startswith("data:image/png;base64,"))
147
  self.assertNotIn("__MANROPE_DATA__", app.CSS)
148
  self.assertIn("prefers-reduced-motion", app.CSS)
149
 
 
142
  self.assertEqual(states[-1][3], "[]")
143
  self.assertEqual(len(states[-1]), 7)
144
 
145
+ def test_fonts_are_self_contained(self):
 
146
  self.assertNotIn("__MANROPE_DATA__", app.CSS)
147
  self.assertIn("prefers-reduced-motion", app.CSS)
148