Spaces:
Sleeping
Sleeping
Commit ·
1a59ec0
1
Parent(s): 92d8a09
feat: add branded metadata and Space polish
Browse filesAdd custom social metadata, branded SVG assets, and tighter overview guidance for the Slipstream Lab app.
- app.py +4 -12
- app_logic.py +48 -1
- assets/slipstream-mark.svg +8 -0
- assets/slipstream-social-card.svg +24 -0
app.py
CHANGED
|
@@ -6,7 +6,9 @@ import gradio as gr
|
|
| 6 |
from app_logic import (
|
| 7 |
analyze_wire,
|
| 8 |
build_ucr_rows,
|
|
|
|
| 9 |
get_langgraph_snippet,
|
|
|
|
| 10 |
get_overview_metrics,
|
| 11 |
get_resource_rows,
|
| 12 |
get_training_guidance,
|
|
@@ -264,18 +266,7 @@ with gr.Blocks(title="Slipstream Lab") as demo:
|
|
| 264 |
|
| 265 |
with gr.Tabs():
|
| 266 |
with gr.TabItem("Overview"):
|
| 267 |
-
gr.Markdown(
|
| 268 |
-
"""
|
| 269 |
-
## What this Space is for
|
| 270 |
-
|
| 271 |
-
Use this Space when you want to inspect the released protocol,
|
| 272 |
-
validate concrete wire examples, or understand how Slipstream
|
| 273 |
-
fits into a LangGraph-style orchestration stack.
|
| 274 |
-
|
| 275 |
-
It does **not** try to be a second homepage and it does **not**
|
| 276 |
-
depend on live model inference.
|
| 277 |
-
"""
|
| 278 |
-
)
|
| 279 |
gr.Markdown(_resources_markdown())
|
| 280 |
|
| 281 |
with gr.TabItem("UCR Explorer"):
|
|
@@ -428,4 +419,5 @@ if __name__ == "__main__":
|
|
| 428 |
neutral_hue="zinc",
|
| 429 |
),
|
| 430 |
css=CUSTOM_CSS,
|
|
|
|
| 431 |
)
|
|
|
|
| 6 |
from app_logic import (
|
| 7 |
analyze_wire,
|
| 8 |
build_ucr_rows,
|
| 9 |
+
get_head_html,
|
| 10 |
get_langgraph_snippet,
|
| 11 |
+
get_overview_markdown,
|
| 12 |
get_overview_metrics,
|
| 13 |
get_resource_rows,
|
| 14 |
get_training_guidance,
|
|
|
|
| 266 |
|
| 267 |
with gr.Tabs():
|
| 268 |
with gr.TabItem("Overview"):
|
| 269 |
+
gr.Markdown(get_overview_markdown())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
gr.Markdown(_resources_markdown())
|
| 271 |
|
| 272 |
with gr.TabItem("UCR Explorer"):
|
|
|
|
| 419 |
neutral_hue="zinc",
|
| 420 |
),
|
| 421 |
css=CUSTOM_CSS,
|
| 422 |
+
head=get_head_html(),
|
| 423 |
)
|
app_logic.py
CHANGED
|
@@ -16,6 +16,11 @@ from slipcore import (
|
|
| 16 |
ROOT = Path(__file__).resolve().parents[1]
|
| 17 |
VALID_VECTORS = ROOT / "spec" / "conformance" / "valid.jsonl"
|
| 18 |
INVALID_VECTORS = ROOT / "spec" / "conformance" / "invalid.jsonl"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
FALLBACK_VALID_WIRES = [
|
| 20 |
"SLIP v3 planner reviewer Request Review auth",
|
| 21 |
"SLIP v3 ops dev Inform Status green",
|
|
@@ -221,11 +226,53 @@ def get_overview_metrics() -> list[dict[str, str]]:
|
|
| 221 |
return [
|
| 222 |
{"metric": "Current release", "value": "3.1.1"},
|
| 223 |
{"metric": "Core dependencies", "value": "0"},
|
| 224 |
-
{"metric": "Passing tests", "value": "
|
| 225 |
{"metric": "Average token reduction", "value": "82%"},
|
| 226 |
]
|
| 227 |
|
| 228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
def get_resource_rows() -> list[dict[str, str]]:
|
| 230 |
return [
|
| 231 |
{"resource": "Website", "link": "https://slipstream.making-minds.ai"},
|
|
|
|
| 16 |
ROOT = Path(__file__).resolve().parents[1]
|
| 17 |
VALID_VECTORS = ROOT / "spec" / "conformance" / "valid.jsonl"
|
| 18 |
INVALID_VECTORS = ROOT / "spec" / "conformance" / "invalid.jsonl"
|
| 19 |
+
SPACE_RAW_ASSET_BASE = "https://huggingface.co/spaces/anthonym21/slipcore/raw/main/assets"
|
| 20 |
+
SPACE_URL = "https://anthonym21-slipcore.hf.space/"
|
| 21 |
+
WEBSITE_URL = "https://slipstream.making-minds.ai"
|
| 22 |
+
FAVICON_URL = f"{SPACE_RAW_ASSET_BASE}/slipstream-mark.svg"
|
| 23 |
+
SOCIAL_CARD_URL = f"{SPACE_RAW_ASSET_BASE}/slipstream-social-card.svg"
|
| 24 |
FALLBACK_VALID_WIRES = [
|
| 25 |
"SLIP v3 planner reviewer Request Review auth",
|
| 26 |
"SLIP v3 ops dev Inform Status green",
|
|
|
|
| 226 |
return [
|
| 227 |
{"metric": "Current release", "value": "3.1.1"},
|
| 228 |
{"metric": "Core dependencies", "value": "0"},
|
| 229 |
+
{"metric": "Passing tests", "value": "593"},
|
| 230 |
{"metric": "Average token reduction", "value": "82%"},
|
| 231 |
]
|
| 232 |
|
| 233 |
|
| 234 |
+
def get_head_html() -> str:
|
| 235 |
+
description = (
|
| 236 |
+
"Inspect Slipstream 3.1.1, validate SLIP v3 wires, browse UCR anchors, "
|
| 237 |
+
"and copy LangGraph starter patterns without a live model dependency."
|
| 238 |
+
)
|
| 239 |
+
return f"""
|
| 240 |
+
<meta name="description" content="{description}" />
|
| 241 |
+
<meta name="theme-color" content="#111111" />
|
| 242 |
+
<meta property="og:site_name" content="Slipstream Lab" />
|
| 243 |
+
<meta property="og:title" content="Slipstream Lab" />
|
| 244 |
+
<meta property="og:description" content="{description}" />
|
| 245 |
+
<meta property="og:type" content="website" />
|
| 246 |
+
<meta property="og:url" content="{SPACE_URL}" />
|
| 247 |
+
<meta property="og:image" content="{SOCIAL_CARD_URL}" />
|
| 248 |
+
<meta name="twitter:card" content="summary_large_image" />
|
| 249 |
+
<meta name="twitter:title" content="Slipstream Lab" />
|
| 250 |
+
<meta name="twitter:description" content="{description}" />
|
| 251 |
+
<meta name="twitter:image" content="{SOCIAL_CARD_URL}" />
|
| 252 |
+
<meta name="twitter:url" content="{SPACE_URL}" />
|
| 253 |
+
<link rel="icon" type="image/svg+xml" href="{FAVICON_URL}" />
|
| 254 |
+
"""
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
def get_overview_markdown() -> str:
|
| 258 |
+
return f"""
|
| 259 |
+
## Start here
|
| 260 |
+
|
| 261 |
+
This Space is for engineers evaluating Slipstream in a real agent stack.
|
| 262 |
+
|
| 263 |
+
1. **Inspect the protocol surface** in `UCR Explorer`.
|
| 264 |
+
2. **Validate concrete messages** in `Conformance Lab`.
|
| 265 |
+
3. **Drop the adapter into LangGraph** from `LangGraph Starter`.
|
| 266 |
+
4. **Use the dataset/model tab last**, after you have measured fallback rate and routing quality.
|
| 267 |
+
|
| 268 |
+
You do not need to train a model to adopt Slipstream. Start with the runtime,
|
| 269 |
+
route on `Force:Object`, and train only if your workload needs better
|
| 270 |
+
quantization than the built-in path provides.
|
| 271 |
+
|
| 272 |
+
For the release narrative, benchmarks, and positioning, use the website: {WEBSITE_URL}
|
| 273 |
+
"""
|
| 274 |
+
|
| 275 |
+
|
| 276 |
def get_resource_rows() -> list[dict[str, str]]:
|
| 277 |
return [
|
| 278 |
{"resource": "Website", "link": "https://slipstream.making-minds.ai"},
|
assets/slipstream-mark.svg
ADDED
|
|
assets/slipstream-social-card.svg
ADDED
|
|