Spaces:
Build error
Build error
| # app.py (for Hugging Face Spaces) | |
| import os | |
| # Your API keys are already available as env vars on Spaces. | |
| from stella_ui_english import StellaEnglishUI | |
| import stella_core # ensure core is imported so templates/mem0 init is available | |
| # Initialize STELLA core similarly to start_stella_web.py | |
| # If stella_core has an initializer, call it here (defensive; no-op if absent): | |
| try: | |
| stella_core.initialize_stella(use_template=True, use_mem0=True) | |
| except Exception: | |
| pass | |
| ui = StellaEnglishUI() | |
| demo = ui.create_interface() # IMPORTANT: do NOT call demo.launch() on Spaces | |