RFTSystems commited on
Commit
acdeca8
·
verified ·
1 Parent(s): 7c085e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -11
app.py CHANGED
@@ -23,8 +23,8 @@ def run_epochs(n=50):
23
  base = mutate_formula(base, epoch)
24
  seal = hashlib.sha512(base.encode()).hexdigest()
25
  complexity = base.count("\\") + base.count("+")
26
- formulas.append(f"**Epoch {epoch}**\n\n$$ {base} $$\n\nImmortality Glyph: `{seal[:32]}...`")
27
- return "\n\n---\n\n".join(formulas)
28
 
29
  # === Complexity Plot ===
30
  def plot_complexity(n=50):
@@ -38,27 +38,41 @@ def plot_complexity(n=50):
38
  plt.figure(figsize=(8,5), facecolor="black")
39
  plt.plot(epochs, complexities, color="cyan", marker="o", linestyle="--")
40
  plt.title("Symbolic Complexity Growth Across Epochs", color="white")
41
- plt.xlabel("Epoch"); plt.ylabel("Complexity Score")
42
  plt.grid(alpha=0.3); plt.gca().set_facecolor("black")
 
43
  return plt.gcf()
44
 
45
  # === Gradio App ===
46
- with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
47
- gr.Markdown("# 🌌 Resonance Atlas — The Living Codex")
48
- gr.Markdown("Watch formulas evolve into higher symbolic forms across epochs. Each scroll is sealed with an Immortality Glyph.")
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  with gr.Tab("Codex Scrolls"):
51
- run_button = gr.Button("Run 50 Epochs")
52
- output = gr.Markdown()
 
53
  run_button.click(fn=run_epochs, inputs=None, outputs=output)
54
 
55
  with gr.Tab("Complexity Timeline"):
56
- plot_button = gr.Button("Show Complexity Growth")
 
57
  plot_output = gr.Plot()
58
  plot_button.click(fn=plot_complexity, inputs=None, outputs=plot_output)
59
 
60
  with gr.Tab("Immersion Mode"):
61
- gr.Markdown("### Full‑screen dynamic visualization coming soon…")
62
- gr.Markdown("Formulas pulse, glyphs glow, epochs unfold.")
63
 
64
  demo.launch()
 
23
  base = mutate_formula(base, epoch)
24
  seal = hashlib.sha512(base.encode()).hexdigest()
25
  complexity = base.count("\\") + base.count("+")
26
+ formulas.append(f"### Epoch {epoch}\n\n$$ {base} $$\n\nImmortality Glyph: `{seal[:32]}...`\n\n")
27
+ return "\n\n".join(formulas)
28
 
29
  # === Complexity Plot ===
30
  def plot_complexity(n=50):
 
38
  plt.figure(figsize=(8,5), facecolor="black")
39
  plt.plot(epochs, complexities, color="cyan", marker="o", linestyle="--")
40
  plt.title("Symbolic Complexity Growth Across Epochs", color="white")
41
+ plt.xlabel("Epoch", color="white"); plt.ylabel("Complexity Score", color="white")
42
  plt.grid(alpha=0.3); plt.gca().set_facecolor("black")
43
+ plt.tick_params(colors="white")
44
  return plt.gcf()
45
 
46
  # === Gradio App ===
47
+ custom_theme = gr.themes.Base(
48
+ primary_hue="cyan",
49
+ secondary_hue="magenta",
50
+ neutral_hue="black",
51
+ )
52
+
53
+ with gr.Blocks(theme=custom_theme) as demo:
54
+ gr.Markdown(
55
+ """
56
+ # 🌌 Resonance Atlas — The Living Codex
57
+ Immerse yourself in evolving scrolls of mathematics.
58
+ Formulas mutate into higher symbolic forms across epochs, sealed with Immortality Glyphs.
59
+ """,
60
+ )
61
 
62
  with gr.Tab("Codex Scrolls"):
63
+ gr.Markdown("### 🔢 Live Epoch Run")
64
+ run_button = gr.Button("Run 50 Epochs", elem_classes="glow-button")
65
+ output = gr.Markdown(elem_classes="scroll-output")
66
  run_button.click(fn=run_epochs, inputs=None, outputs=output)
67
 
68
  with gr.Tab("Complexity Timeline"):
69
+ gr.Markdown("### 📈 Complexity Growth")
70
+ plot_button = gr.Button("Show Complexity Growth", elem_classes="glow-button")
71
  plot_output = gr.Plot()
72
  plot_button.click(fn=plot_complexity, inputs=None, outputs=plot_output)
73
 
74
  with gr.Tab("Immersion Mode"):
75
+ gr.Markdown("### 🌠 Immersion Mode")
76
+ gr.Markdown("Formulas pulse, glyphs glow, epochs unfold in full-screen dynamic visualization.")
77
 
78
  demo.launch()