"""NEXUSMON — Community Public ritual space. Part of the Nexusmon sovereign AI organism. """ from __future__ import annotations import base64 import time from pathlib import Path import gradio as gr ORG_URL = "https://huggingface.co/Nexusmon" FRONT_DOOR_URL = "https://huggingface.co/spaces/Nexusmon/README" RANKING_URL = "https://huggingface.co/spaces/Nexusmon/hf-nexusmon-ranking" KNOWLEDGE_URL = "https://huggingface.co/spaces/Nexusmon/hf-nexusmon-knowledge" PRESENCE_BANNER = "nexusmon-presence.svg" def _presence_banner_src() -> str | None: candidates = [ Path(__file__).resolve().parent / "assets" / PRESENCE_BANNER, Path(__file__).resolve().parents[4] / "assets" / PRESENCE_BANNER, ] for candidate in candidates: if candidate.is_file(): encoded = base64.b64encode(candidate.read_bytes()).decode("ascii") return f"data:image/svg+xml;base64,{encoded}" return None def build() -> str: now = time.strftime("%Y-%m-%d %H:%M UTC", time.gmtime()) banner_src = _presence_banner_src() if banner_src: banner = f"""
NEXUSMON presence banner
""".strip() else: banner = """
NEXUSMON presence banner unavailable
""".strip() return f"""
{banner}
NEXUSMON / public ritual space

Community

Open membrane for the NEXUSMON community. Sovereign AI collective.

This surface is part of the NEXUSMON sovereign AI organism. Navigate via the links above.

Rendered {now}
""".strip() theme = gr.themes.Base( primary_hue=gr.themes.Color( c100="#e0f2fe", c200="#bae6fd", c300="#7dd3fc", c400="#38bdf8", c500="#0ea5e9", c600="#0284c7", c700="#0369a1", c800="#075985", c900="#0c4a6e", c950="#082f49", ), secondary_hue=gr.themes.colors.indigo, neutral_hue=gr.themes.colors.slate, font=[gr.themes.GoogleFont("Space Grotesk"), gr.themes.GoogleFont("Inter"), "system-ui", "sans-serif"], font_mono=[gr.themes.GoogleFont("IBM Plex Mono"), "monospace"], ).set( body_background_fill="#07080f", body_text_color="#e8f4ff", block_background_fill="#0d101c", block_border_width="0px", ) css = Path(__file__).with_name("custom.css").read_text(encoding="utf-8") with gr.Blocks(theme=theme, css=css, title="NEXUSMON — Community", analytics_enabled=False) as demo: content = gr.HTML() demo.load(fn=build, outputs=content) demo.queue() demo.launch()