LordMo2 commited on
Commit
0f69076
·
verified ·
1 Parent(s): e70826e

Deploy Nexusmon Community Space

Browse files
DEPLOY.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Deploy to Hugging Face Space `Nexusmon/Community`
2
+
3
+ ## One-time: clone the empty Space (or use `hf download`)
4
+
5
+ ```powershell
6
+ # Token: https://huggingface.co/settings/tokens (write access for Space)
7
+ git clone https://huggingface.co/spaces/Nexusmon/Community
8
+ cd Community
9
+ ```
10
+
11
+ ## Copy files from this monorepo
12
+
13
+ From the NEXUSMON repo root, copy **the contents** of `spaces/hf-nexusmon-README/` into the Space repo root (same level as where `app.py` should live):
14
+
15
+ - `app.py`
16
+ - `README.md` (Space card YAML + description)
17
+ - `requirements.txt`
18
+ - `custom.css`
19
+ - `DEPLOY.md` (optional)
20
+
21
+ ## Push
22
+
23
+ ### Option A — one command (from this folder, token required)
24
+
25
+ ```powershell
26
+ $env:HF_TOKEN = "hf_..." # https://huggingface.co/settings/tokens
27
+ .\push-to-hf.ps1
28
+ ```
29
+
30
+ Runs `deploy_upload.py` (uses `huggingface_hub` — same stack as `hf` CLI).
31
+
32
+ ### Option B — git
33
+
34
+ ```powershell
35
+ git add app.py README.md requirements.txt custom.css
36
+ git commit -m "feat(space): Nexusmon Community"
37
+ git push
38
+ ```
39
+
40
+ The Space rebuilds in a few minutes. If the build fails on `sdk_version`, edit the YAML in `README.md` to match the Gradio version Hugging Face pins for new Spaces (or align `requirements.txt` with that version).
41
+
42
+ ## CLI install (Windows)
43
+
44
+ ```powershell
45
+ powershell -ExecutionPolicy ByPass -c "irm https://hf.co/cli/install.ps1 | iex"
46
+ hf auth login
47
+ hf download Nexusmon/Community --repo-type=space
48
+ ```
README.md CHANGED
@@ -1,13 +1,69 @@
1
  ---
2
- title: Community
3
- emoji: 🐠
4
- colorFrom: indigo
5
- colorTo: purple
6
  sdk: gradio
7
- sdk_version: 6.14.0
8
- python_version: '3.13'
9
  app_file: app.py
10
  pinned: false
 
 
 
 
 
 
 
 
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Nexusmon Community
3
+ emoji: 🚀
4
+ colorFrom: gray
5
+ colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: 5.9.1
 
8
  app_file: app.py
9
  pinned: false
10
+ license: mit
11
+ short_description: Public Nexusmon community space with the core sealed.
12
+ tags:
13
+ - nexusmon
14
+ - community
15
+ - gradio
16
+ - creative
17
+ - public
18
  ---
19
 
20
+ # Nexusmon Community
21
+
22
+ This is the public creative ring around Nexusmon.
23
+
24
+ It is for:
25
+
26
+ - ideas
27
+ - art
28
+ - launch notes
29
+ - public questions
30
+ - safe community sparks
31
+
32
+ It is not for:
33
+
34
+ - internal routes
35
+ - operator keys
36
+ - hidden architecture
37
+ - training data
38
+ - private deployment details
39
+
40
+ ## What this Space does
41
+
42
+ - gives the public a clean Nexusmon landing surface
43
+ - keeps the message creative and high-level
44
+ - mints a tiny public-safe spark from one theme
45
+ - keeps the core sealed by design
46
+
47
+ ## What to post here
48
+
49
+ - one creative idea
50
+ - one short community update
51
+ - one public-facing question
52
+ - one safe feature request
53
+
54
+ ## What stays sealed
55
+
56
+ The engine, the wiring, and the private working parts stay inside Nexusmon.
57
+ This Space only shows the outer story.
58
+
59
+ ## Style
60
+
61
+ - dark
62
+ - focused
63
+ - creative
64
+ - public-safe
65
+ - minimal on purpose
66
+
67
+ ## Deploy
68
+
69
+ Use the helper in this folder to publish updates to Hugging Face.
__pycache__/app.cpython-312.pyc ADDED
Binary file (7.83 kB). View file
 
__pycache__/deploy_upload.cpython-312.pyc ADDED
Binary file (1.78 kB). View file
 
app.py ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Nexusmon Community - a public, creative surface with the core kept sealed."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+
7
+ import gradio as gr
8
+
9
+
10
+ def _clean(text: str) -> str:
11
+ return " ".join((text or "").strip().split())
12
+
13
+
14
+ def _load_css() -> str:
15
+ path = Path(__file__).resolve().parent / "custom.css"
16
+ return path.read_text(encoding="utf-8") if path.is_file() else ""
17
+
18
+
19
+ def _community_spark(theme: str) -> str:
20
+ topic = _clean(theme) or "one creative thing to explore"
21
+ return "\n".join(
22
+ [
23
+ "### Community spark",
24
+ f"- **Theme:** {topic}",
25
+ "- **Public angle:** share a small story, lesson, sketch, or question.",
26
+ "- **Safe next move:** keep the core private and only expose the creative layer.",
27
+ "- **Prompt:** what would you build, write, or show if the engine stayed hidden?",
28
+ ]
29
+ )
30
+
31
+
32
+ def build_ui() -> gr.Blocks:
33
+ theme = gr.themes.Base(
34
+ primary_hue=gr.themes.Color(
35
+ c50="#e7fbff",
36
+ c100="#c7f4ff",
37
+ c200="#96e9ff",
38
+ c300="#5fd6ff",
39
+ c400="#2cc2ff",
40
+ c500="#00aef2",
41
+ c600="#008fcc",
42
+ c700="#006fa0",
43
+ c800="#0a567f",
44
+ c900="#0a3e5b",
45
+ c950="#08283b",
46
+ ),
47
+ secondary_hue=gr.themes.Color(
48
+ c50="#fff7df",
49
+ c100="#ffe9ad",
50
+ c200="#ffd56d",
51
+ c300="#ffc63b",
52
+ c400="#ffb200",
53
+ c500="#e29a00",
54
+ c600="#b87900",
55
+ c700="#8f5d00",
56
+ c800="#6d4700",
57
+ c900="#4f3300",
58
+ c950="#2d1e00",
59
+ ),
60
+ neutral_hue=gr.themes.colors.slate,
61
+ font=[gr.themes.GoogleFont("Outfit"), "system-ui", "sans-serif"],
62
+ font_mono=[gr.themes.GoogleFont("IBM Plex Mono"), "monospace"],
63
+ ).set(
64
+ body_background_fill="#07080f",
65
+ body_text_color="#e8f4ff",
66
+ block_background_fill="#0d101c",
67
+ block_border_width="1px",
68
+ block_border_color="rgba(120, 200, 255, 0.18)",
69
+ input_background_fill="#111827",
70
+ input_border_color="rgba(56, 189, 248, 0.18)",
71
+ button_primary_background_fill="#00aef2",
72
+ button_primary_text_color="#08131d",
73
+ )
74
+
75
+ with gr.Blocks(theme=theme, css=_load_css(), title="Nexusmon Community", analytics_enabled=False) as demo:
76
+ gr.HTML(
77
+ """
78
+ <div class="nx-hero">
79
+ <h1 class="nx-title">Nexusmon Community</h1>
80
+ <p class="nx-sub">
81
+ A public creative ring around Nexusmon. We share ideas, art, and momentum here.
82
+ The engine stays sealed. The vibe stays sharp.
83
+ </p>
84
+ <div class="nx-badge-row">
85
+ <span class="nx-badge">public-facing</span>
86
+ <span class="nx-badge">creative</span>
87
+ <span class="nx-badge">sealed-core</span>
88
+ <span class="nx-badge">no internals</span>
89
+ </div>
90
+ </div>
91
+ """
92
+ )
93
+
94
+ with gr.Row(equal_height=True):
95
+ with gr.Column(scale=1, min_width=320):
96
+ with gr.Group(elem_classes=["nx-card"]):
97
+ gr.Markdown("### Make a community spark")
98
+ gr.Markdown(
99
+ "Drop one theme, one idea, or one post direction. The page returns a tiny public-safe spark."
100
+ )
101
+ theme_input = gr.Textbox(
102
+ label="Theme",
103
+ lines=3,
104
+ placeholder="Example: creative launch post, fan art, community question, weekly recap",
105
+ )
106
+ spark_btn = gr.Button("Mint spark", variant="primary")
107
+ spark_out = gr.Markdown()
108
+
109
+ with gr.Column(scale=1, min_width=320):
110
+ with gr.Group(elem_classes=["nx-card"]):
111
+ gr.Markdown("### What stays private")
112
+ gr.Markdown(
113
+ "- engine details\n"
114
+ "- operator keys\n"
115
+ "- hidden routes\n"
116
+ "- training data\n"
117
+ "- internal topology"
118
+ )
119
+
120
+ with gr.Row():
121
+ with gr.Column():
122
+ with gr.Group(elem_classes=["nx-card"]):
123
+ gr.Markdown("### Community rules")
124
+ gr.Markdown(
125
+ "1. Keep it creative.\n"
126
+ "2. Keep it respectful.\n"
127
+ "3. Keep the core sealed.\n"
128
+ "4. Share outcomes, not secrets."
129
+ )
130
+
131
+ with gr.Row():
132
+ with gr.Column():
133
+ with gr.Group(elem_classes=["nx-card"]):
134
+ gr.Markdown("### What people can do here")
135
+ gr.Markdown(
136
+ "- post ideas for public Nexusmon themes\n"
137
+ "- share screenshots, art, and short notes\n"
138
+ "- suggest safe surface-level features\n"
139
+ "- ask for help shaping the public story"
140
+ )
141
+
142
+ spark_btn.click(fn=_community_spark, inputs=theme_input, outputs=spark_out)
143
+ theme_input.submit(fn=_community_spark, inputs=theme_input, outputs=spark_out)
144
+
145
+ gr.Markdown(
146
+ "<p style='text-align:center;color:#8ba4c7;font-size:0.85rem;margin-top:1.5rem'>"
147
+ "Nexusmon Community · public by design · sealed at the core"
148
+ "</p>"
149
+ )
150
+
151
+ return demo
152
+
153
+
154
+ demo = build_ui()
155
+ demo.queue()
156
+
157
+
158
+ if __name__ == "__main__":
159
+ demo.launch()
custom.css ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Outfit:wght@400;600;800&display=swap");
2
+
3
+ :root {
4
+ --nx-bg-0: #07080f;
5
+ --nx-bg-1: #0d101c;
6
+ --nx-line: rgba(120, 200, 255, 0.22);
7
+ --nx-glow: rgba(56, 189, 248, 0.45);
8
+ --nx-text: #e8f4ff;
9
+ --nx-muted: #8ba4c7;
10
+ --nx-accent: #38bdf8;
11
+ --nx-warn: #fbbf24;
12
+ }
13
+
14
+ .gradio-container {
15
+ max-width: min(1280px, 96vw) !important;
16
+ margin: 0 auto !important;
17
+ font-family: "Outfit", system-ui, sans-serif !important;
18
+ background: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.12), transparent),
19
+ radial-gradient(900px 500px at 100% 0%, rgba(99, 102, 241, 0.14), transparent),
20
+ linear-gradient(180deg, var(--nx-bg-0), var(--nx-bg-1)) !important;
21
+ }
22
+
23
+ footer {
24
+ display: none !important;
25
+ }
26
+
27
+ .nx-hero {
28
+ position: relative;
29
+ padding: 1.75rem 1.5rem 1.25rem;
30
+ border: 1px solid var(--nx-line);
31
+ border-radius: 14px;
32
+ background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 27, 75, 0.35));
33
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 20px 80px -30px var(--nx-glow);
34
+ overflow: hidden;
35
+ }
36
+
37
+ .nx-hero::before {
38
+ content: "";
39
+ position: absolute;
40
+ inset: 0;
41
+ background: repeating-linear-gradient(
42
+ 90deg,
43
+ transparent,
44
+ transparent 48px,
45
+ rgba(56, 189, 248, 0.03) 48px,
46
+ rgba(56, 189, 248, 0.03) 49px
47
+ );
48
+ pointer-events: none;
49
+ }
50
+
51
+ .nx-title {
52
+ font-family: "Outfit", sans-serif;
53
+ font-weight: 800;
54
+ font-size: clamp(1.85rem, 4vw, 2.75rem);
55
+ letter-spacing: -0.03em;
56
+ color: var(--nx-text);
57
+ margin: 0 0 0.35rem;
58
+ text-shadow: 0 0 40px rgba(56, 189, 248, 0.25);
59
+ }
60
+
61
+ .nx-sub {
62
+ color: var(--nx-muted);
63
+ font-size: 1.05rem;
64
+ max-width: 52ch;
65
+ line-height: 1.5;
66
+ margin: 0;
67
+ }
68
+
69
+ .nx-badge-row {
70
+ display: flex;
71
+ flex-wrap: wrap;
72
+ gap: 0.5rem;
73
+ margin-top: 1rem;
74
+ }
75
+
76
+ .nx-badge {
77
+ font-family: "IBM Plex Mono", monospace;
78
+ font-size: 0.72rem;
79
+ text-transform: uppercase;
80
+ letter-spacing: 0.12em;
81
+ padding: 0.35rem 0.65rem;
82
+ border-radius: 6px;
83
+ border: 1px solid var(--nx-line);
84
+ color: var(--nx-accent);
85
+ background: rgba(56, 189, 248, 0.06);
86
+ }
87
+
88
+ .nx-card {
89
+ border: 1px solid var(--nx-line) !important;
90
+ border-radius: 12px !important;
91
+ background: rgba(15, 23, 42, 0.55) !important;
92
+ }
93
+
94
+ .nx-mono {
95
+ font-family: "IBM Plex Mono", monospace !important;
96
+ }
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio>=5.9.0,<6