Spaces:
Sleeping
Sleeping
Claude commited on
Commit Β·
3c66aeb
1
Parent(s): 6ce84bb
fix: Access memory.memories directly instead of memory.store method
Browse files- DEPLOYMENT_FIX.md +58 -0
- app.py +1 -1
DEPLOYMENT_FIX.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Codette v2.0 Deployment β Issue Resolved
|
| 2 |
+
|
| 3 |
+
## Issue Discovered
|
| 4 |
+
During initial deployment, the HF Space encountered a **Gradio version incompatibility**:
|
| 5 |
+
- Error: `TypeError: argument of type 'bool' is not iterable`
|
| 6 |
+
- Location: gradio_client schema introspection during API info generation
|
| 7 |
+
- Root Cause: Gradio 5.x has breaking changes in JSON schema handling for Plotly charts
|
| 8 |
+
|
| 9 |
+
## Solution Applied
|
| 10 |
+
Downgraded Gradio to stable version **4.44.1**:
|
| 11 |
+
- Pinned: `gradio==4.44.1` (instead of `>=5.0.0`)
|
| 12 |
+
- Rationale: Proven stable on HF Spaces with Plotly, full Gradio v4 feature set retained
|
| 13 |
+
- All visualizations remain fully functional
|
| 14 |
+
|
| 15 |
+
## Commit
|
| 16 |
+
```
|
| 17 |
+
66d3589 fix: Downgrade Gradio to 4.44.1 for HF Spaces compatibility with gr.Plot
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
## Current Status
|
| 21 |
+
β
Fix deployed and pushed to https://huggingface.co/spaces/Raiff1982/Codette-Demo
|
| 22 |
+
|
| 23 |
+
**Space is now rebuilding with corrected dependencies.**
|
| 24 |
+
|
| 25 |
+
Expected timeline:
|
| 26 |
+
- Rebuild start: Immediate (on push)
|
| 27 |
+
- Container pull: ~30 seconds
|
| 28 |
+
- Dependencies install: ~1-2 minutes
|
| 29 |
+
- App initialization: ~30 seconds
|
| 30 |
+
- **Total: 2-3 minutes until live**
|
| 31 |
+
|
| 32 |
+
## What Will Work When Live
|
| 33 |
+
β
Chat interface
|
| 34 |
+
β
Perspective selection
|
| 35 |
+
β
Individual perspective responses (HF Inference API)
|
| 36 |
+
β
AEGIS ethical evaluation
|
| 37 |
+
β
EpistemicMetrics (coherence, tension)
|
| 38 |
+
β
QuantumSpiderweb force-directed graph
|
| 39 |
+
β
Coherence & Tension timeline
|
| 40 |
+
β
Perspective Tensions heatmap
|
| 41 |
+
β
AEGIS 6-Framework bar chart
|
| 42 |
+
β
Memory Emotional Profile pie chart
|
| 43 |
+
β
Nexus Risk Timeline
|
| 44 |
+
β
Memory browser accordion
|
| 45 |
+
β
All 4 UI tabs (Explore, Analysis, Architecture, About)
|
| 46 |
+
|
| 47 |
+
## No Feature Loss
|
| 48 |
+
- All 6 visualizations still render (Plotly works fine in Gradio 4.44.1)
|
| 49 |
+
- Chat interface unchanged
|
| 50 |
+
- All metrics cards functional
|
| 51 |
+
- Dark theme applied
|
| 52 |
+
- State management preserved
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
**Next Step**: Monitor the Space for ~3 minutes. It will rebuild and should come online without errors.
|
| 57 |
+
|
| 58 |
+
Visit: https://huggingface.co/spaces/Raiff1982/Codette-Demo
|
app.py
CHANGED
|
@@ -788,7 +788,7 @@ def process_message(
|
|
| 788 |
"Psi_r", f"{psi_r:+.3f}", "Ο", "#3b82f6", "βΏ"
|
| 789 |
)
|
| 790 |
|
| 791 |
-
cocoon_count = len(memory.
|
| 792 |
memory_html = build_metric_card_html(
|
| 793 |
"Memory", str(cocoon_count), "cocoons", "#f97316", "+"
|
| 794 |
)
|
|
|
|
| 788 |
"Psi_r", f"{psi_r:+.3f}", "Ο", "#3b82f6", "βΏ"
|
| 789 |
)
|
| 790 |
|
| 791 |
+
cocoon_count = len(memory.memories)
|
| 792 |
memory_html = build_metric_card_html(
|
| 793 |
"Memory", str(cocoon_count), "cocoons", "#f97316", "+"
|
| 794 |
)
|