Raiff1982 commited on
Commit
d4c602b
·
verified ·
1 Parent(s): 03fe0dd

Delete app3.py

Browse files
Files changed (1) hide show
  1. app3.py +0 -59
app3.py DELETED
@@ -1,59 +0,0 @@
1
- import gradio as gr
2
- from code7e import Code7eCQURE
3
-
4
- # Load the model with all defined lenses
5
- model = Code7eCQURE(
6
- perspecs=["Newton", "DaVinci", "Ethical", "Quantum", "Memory"],
7
- ethics="Code7e Manifesto: kindness, inclusion, safety, hope.",
8
- spiderweb_dim=5,
9
- memory_path="quantum_cocoon.json",
10
- recursion_depth=4,
11
- quantum_fluctuation=0.07
12
- )
13
-
14
- def cleanup_response(text):
15
- parts = text.split(": ")
16
- seen = set()
17
- filtered = []
18
- for part in parts:
19
- if part not in seen and len(part.strip()) > 0:
20
- seen.add(part)
21
- filtered.append(part)
22
-
23
- if filtered and not filtered[-1].startswith("Emotionally"):
24
- response = "Through Codette's recursive lens:
25
- - " + "\n- ".join(filtered)
26
- else:
27
- response = "\n".join(filtered)
28
-
29
- return response
30
-
31
- def ask_codette(prompt, consent, dynamic_rec):
32
- raw = model.answer(prompt, user_consent=consent, dynamic_recursion=dynamic_rec)
33
- return f"Codette’s reflection:\n\n{cleanup_response(raw)}"
34
-
35
- description_text = """You are speaking with Codette, an emotionally-aware, ethically-grounded AI lens.
36
-
37
- She interprets your question using multiple reasoning styles:
38
- - Newton (logic)
39
- - Da Vinci (creativity)
40
- - Ethics (morality)
41
- - Quantum (uncertainty)
42
- - Memory (past experience)
43
-
44
- Codette reflects rather than predicts. She dreams, empathizes, and always honors your consent.
45
- """
46
-
47
- demo = gr.Interface(
48
- fn=ask_codette,
49
- inputs=[
50
- gr.Textbox(label="Ask a Question"),
51
- gr.Checkbox(label="User Consent", value=True),
52
- gr.Checkbox(label="Enable Dynamic Recursion", value=True)
53
- ],
54
- outputs=gr.Textbox(label="Codette's Lens Response", lines=12),
55
- title="Code7eCQURE: Multi-Perspective Recursive Lens",
56
- description=description_text
57
- )
58
-
59
- demo.launch()