Spaces:
Paused
Paused
feat: add Demo tab for Maya example; simplify onboarding skip link
Browse files1887 unmodified lines188818891890189118921893189418951896189718981899231 unmodified lines21312132213321342135213621372138213921402141214216 unmodified lines2159216021612162216321641887 unmodified lines# click sets state directly and skips all three# onboarding steps, then renders the home view.gr.HTML('<div style="text-align:center;margin:18px 0 6px;font-size:9px;letter-spacing:.22em;text-transform:uppercase;color:var(--paper-mute);">— or skip the line setup —</div>')demo_btn = gr.Button("✦ Try Maya's example",variant="secondary",elem_classes="demo-btn",)with gr.Column(visible=False) as step2_col:231 unmodified linesinputs=[reaction, reply_note, state], outputs=[content, browser_state, state],).then(fn=lambda: None, outputs=[])# Maya demo button: skip onboarding, go straight to the transmission.demo_btn.click(fn=_load_maya_demo, inputs=[state], outputs=[content, browser_state, state, receive_acc]).then(fn=lambda: gr.Column(visible=False), outputs=[onboard_col])# ── History tab ────────────────────────────────────────────with gr.Tab("History"):# No refresh button — the chamber + memory log auto-flow from# state. The tab simply re-evaluates on each interaction.16 unmodified linesoutputs=[step1_heading],)# ── Architecture tab ───────────────────────────────────────with gr.Tab("Architecture"):gr.HTML("""1887 unmodified lines1888188918901891189218931894231 unmodified lines212621272128212921302131213216 unmodified lines214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021711887 unmodified lines# click sets state directly and skips all three# onboarding steps, then renders the home view.gr.HTML('<div style="text-align:center;margin:18px 0 6px;font-size:11px;color:var(--paper-mute);">or <a href="?tab=Demo">try Maya\'s example</a></div>')with gr.Column(visible=False) as step2_col:231 unmodified linesinputs=[reaction, reply_note, state], outputs=[content, browser_state, state],).then(fn=lambda: None, outputs=[])# ── History tab ────────────────────────────────────────────with gr.Tab("History"):# No refresh button — the chamber + memory log auto-flow from# state. The tab simply re-evaluates on each interaction.16 unmodified linesoutputs=[step1_heading],)# ── Demo tab ─────────────────────────────────────────────with gr.Tab("✦ Demo"):gr.HTML("""<div class="arch-pane"><div class="arch-h">try maya's example</div><p style="margin:12px 0 16px;font-size:15px;line-height:1.5;color:var(--paper);">Skip the setup and see what a day looks like. Maya, a 28-year-old founder,has been using Future Selves for 4 days. Click below to hear her latesttransmission and explore her memory log.</p></div>""")demo_tab_btn = gr.Button("✦ Load Maya's example", variant="primary", size="lg")demo_tab_btn.click(fn=_load_maya_demo, inputs=[state], outputs=[content, browser_state, state, receive_acc]).then(fn=lambda: gr.Tabs(selected=0), outputs=[] # switch to Today tab)# ── Architecture tab ───────────────────────────────────────with gr.Tab("Architecture"):gr.HTML("""
app.py+19-12