INNER CODE UNIT · Python

SPMindGradioApp

tomtommyyuan/spmind · gradio_app.py:12

class SPMindGradioApp:
    def __init__(self):
        self.agent: SPMindAgent | None = None
        self.model = os.getenv("SPMIND_MODEL", "claude-sonnet-4-5")
        self._init_agent()

    def _init_agent(self):
        """Initialize the SP-Mind agent."""
        try:
            self.agent = SPMindAgent(
                path="./data",
                model=self.model,
                permission_mode="bypassPermissions",
            )
        except Exception as e:
            print(f"Agent initialization failed: {e}")
            self.agent = None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…