LordXido commited on
Commit
afaf2a8
·
verified ·
1 Parent(s): 0f19773

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -2,8 +2,6 @@ import gradio as gr
2
  from agent import CodexAgent
3
  from crawler_engine import run_crawler
4
 
5
- gr.HTML_HEADER = "<style>body{font-family:Arial,sans-serif;}</style>"
6
-
7
  agent = CodexAgent()
8
 
9
  def autonomous_run():
@@ -11,19 +9,18 @@ def autonomous_run():
11
  for t in range(agent.max_steps):
12
  projection = agent.step()
13
  logs.append(f"[Step {t}] Ξ={agent.Xi['Ξ']:.2f}, Ψ={agent.Psi['Ψ']:.2f} → {projection}")
14
- return "\\n".join(logs)
15
 
16
  def launch_crawl(seed_url, max_depth):
17
  return run_crawler([seed_url], int(max_depth))
18
 
19
-
20
- with gr.Blocks(title="CAMA‑Ω v4 Integrated Engine") as demo:
21
  gr.Markdown("## 🧠 CAMA‑Ω v4 — Agent + Web Crawler")
22
 
23
  with gr.Tab("Run Agent"):
24
  output_box = gr.Textbox(lines=30, label="Autonomous Agent Log")
25
  run_btn = gr.Button("Run Full Cycle")
26
- run_btn.click(autonomous_run, inputs=None, outputs=output_box)
27
 
28
  with gr.Tab("Web Crawler"):
29
  gr.Markdown("### 🌍 Enter seed URL to crawl")
 
2
  from agent import CodexAgent
3
  from crawler_engine import run_crawler
4
 
 
 
5
  agent = CodexAgent()
6
 
7
  def autonomous_run():
 
9
  for t in range(agent.max_steps):
10
  projection = agent.step()
11
  logs.append(f"[Step {t}] Ξ={agent.Xi['Ξ']:.2f}, Ψ={agent.Psi['Ψ']:.2f} → {projection}")
12
+ return "\n".join(logs)
13
 
14
  def launch_crawl(seed_url, max_depth):
15
  return run_crawler([seed_url], int(max_depth))
16
 
17
+ with gr.Blocks(title="CAMA‑Ω v4 Production") as demo:
 
18
  gr.Markdown("## 🧠 CAMA‑Ω v4 — Agent + Web Crawler")
19
 
20
  with gr.Tab("Run Agent"):
21
  output_box = gr.Textbox(lines=30, label="Autonomous Agent Log")
22
  run_btn = gr.Button("Run Full Cycle")
23
+ run_btn.click(autonomous_run, outputs=output_box)
24
 
25
  with gr.Tab("Web Crawler"):
26
  gr.Markdown("### 🌍 Enter seed URL to crawl")