TheEdict commited on
Commit
e66bd94
Β·
verified Β·
1 Parent(s): 6f25d16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -8
app.py CHANGED
@@ -2,6 +2,8 @@
2
  # requires-python = ">=3.10"
3
  # dependencies = [
4
  # "marimo",
 
 
5
  # ]
6
  # ///
7
 
@@ -20,24 +22,47 @@ def _():
20
  @app.cell
21
  def _(mo):
22
  mo.md("# πŸ¦€ VerdantClaw-Secure")
23
- mo.md("**Status:** Online")
24
  mo.md("---")
25
- mo.md("## Try the slider:")
26
- number = mo.ui.slider(1, 10, value=5, label="Pick a number")
27
- return number,
 
 
 
 
 
 
 
 
 
28
 
29
 
30
  @app.cell
31
- def _(mo, number):
32
- mo.md(f"You picked: **{number.value}**")
 
 
 
 
 
 
 
33
  return
34
 
35
 
36
  @app.cell
37
  def _(mo):
38
  mo.md("---")
39
- mo.md("## Add More Cells")
40
- mo.md("Click the **+** button (top right) to add new cells!")
 
 
 
 
 
 
 
41
  return
42
 
43
 
 
2
  # requires-python = ">=3.10"
3
  # dependencies = [
4
  # "marimo",
5
+ # "gqlalchemy",
6
+ # "plotly",
7
  # ]
8
  # ///
9
 
 
22
  @app.cell
23
  def _(mo):
24
  mo.md("# πŸ¦€ VerdantClaw-Secure")
25
+ mo.md("**Status:** βœ… Online")
26
  mo.md("---")
27
+ return
28
+
29
+
30
+ @app.cell
31
+ def _(mo):
32
+ mo.md("### πŸ“Š Memgraph Query")
33
+ query = mo.ui.text_area(
34
+ label="Cypher Query:",
35
+ value="MATCH (n) RETURN n LIMIT 10",
36
+ full_width=True
37
+ )
38
+ return query,
39
 
40
 
41
  @app.cell
42
+ def _(mo, query):
43
+ from gqlalchemy import Memgraph
44
+ try:
45
+ memgraph = Memgraph(host='localhost', port=7687)
46
+ results = list(memgraph.execute(query.value))
47
+ mo.md(f"**Results:** {len(results)} rows")
48
+ mo.ui.table(results)
49
+ except Exception as e:
50
+ mo.md(f"❌ Memgraph error: {e}")
51
  return
52
 
53
 
54
  @app.cell
55
  def _(mo):
56
  mo.md("---")
57
+ mo.md("### πŸ’¬ Chat")
58
+ chat = mo.ui.text_area(label="Message:", full_width=True)
59
+ return chat,
60
+
61
+
62
+ @app.cell
63
+ def _(chat, mo):
64
+ if chat.value:
65
+ mo.md(f"**You:** {chat.value}")
66
  return
67
 
68