Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,22 +10,6 @@ model = Code7eCQURE(
|
|
| 10 |
quantum_fluctuation=0.07
|
| 11 |
)
|
| 12 |
|
| 13 |
-
def cleanup_response(text):
|
| 14 |
-
parts = text.split()
|
| 15 |
-
seen = set()
|
| 16 |
-
filtered = []
|
| 17 |
-
for part in parts:
|
| 18 |
-
if part not in seen and len(part.strip()) > 0:
|
| 19 |
-
seen.add(part)
|
| 20 |
-
filtered.append(part)
|
| 21 |
-
|
| 22 |
-
if filtered and not filtered[-1].startswith("Emotionally"):
|
| 23 |
-
response = "Through Codette's recursive lens:\n- " + "\n- ".join(filtered)
|
| 24 |
-
else:
|
| 25 |
-
response = .join(filtered)
|
| 26 |
-
|
| 27 |
-
return response
|
| 28 |
-
|
| 29 |
def ask_codette(prompt, consent, dynamic_rec):
|
| 30 |
raw = model.answer(prompt, user_consent=consent, dynamic_recursion=dynamic_rec)
|
| 31 |
return f"Codette’s reflection:\n\n{cleanup_response(raw)}"
|
|
|
|
| 10 |
quantum_fluctuation=0.07
|
| 11 |
)
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
def ask_codette(prompt, consent, dynamic_rec):
|
| 14 |
raw = model.answer(prompt, user_consent=consent, dynamic_recursion=dynamic_rec)
|
| 15 |
return f"Codette’s reflection:\n\n{cleanup_response(raw)}"
|