Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def add_memory(content):
|
|
| 19 |
mid = f"mem_{hashlib.md5(content.encode()).hexdigest()[:8]}"
|
| 20 |
memories[mid] = {"content": content.strip(), "embedding": get_embedding(content)}
|
| 21 |
stats["adds"] += 1
|
| 22 |
-
return f"
|
| 23 |
|
| 24 |
def search_memories(query):
|
| 25 |
if not query or not query.strip():
|
|
@@ -74,4 +74,3 @@ with gr.Blocks(title="Mnemo") as demo:
|
|
| 74 |
gr.Button("Reset").click(reset_all, outputs=s)
|
| 75 |
|
| 76 |
demo.launch()
|
| 77 |
-
# Updated: Thu Feb 26 19:15:15 UTC 2026
|
|
|
|
| 19 |
mid = f"mem_{hashlib.md5(content.encode()).hexdigest()[:8]}"
|
| 20 |
memories[mid] = {"content": content.strip(), "embedding": get_embedding(content)}
|
| 21 |
stats["adds"] += 1
|
| 22 |
+
return f"Added: {mid} (total: {len(memories)})"
|
| 23 |
|
| 24 |
def search_memories(query):
|
| 25 |
if not query or not query.strip():
|
|
|
|
| 74 |
gr.Button("Reset").click(reset_all, outputs=s)
|
| 75 |
|
| 76 |
demo.launch()
|
|
|