Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

delete Path transfer from app

xiangjinyufe6b73d01b0a
diff --git a/examples/spo/README.md b/examples/spo/README.md
index f4fca0f79..28e6f58fc 100644
--- a/examples/spo/README.md
+++ b/examples/spo/README.md
@@ -133,7 +133,7 @@ python -m examples.spo.optimize --help
For a more user-friendly experience, you can use the Streamlit web interface to configure and run the optimizer:
```bash
-streamlit run metagpt/ext/spo/app.py
+python -m streamlit run metagpt/ext/spo/app.py
```
### 4. View Results
diff --git a/metagpt/ext/spo/app.py b/metagpt/ext/spo/app.py
index 8a102ad85..963775be4 100644
--- a/metagpt/ext/spo/app.py
+++ b/metagpt/ext/spo/app.py
@@ -1,5 +1,4 @@
import asyncio
-import sys
from pathlib import Path
from typing import Dict
@@ -7,11 +6,9 @@ import streamlit as st
import yaml
from loguru import logger as _logger
-sys.path.append(str(Path(__file__).parents[3]))
-
-from metagpt.const import METAGPT_ROOT # noqa: E402
-from metagpt.ext.spo.components.optimizer import PromptOptimizer # noqa: E402
-from metagpt.ext.spo.utils.llm_client import SPO_LLM, RequestType # noqa: E402
+from metagpt.const import METAGPT_ROOT
+from metagpt.ext.spo.components.optimizer import PromptOptimizer
+from metagpt.ext.spo.utils.llm_client import SPO_LLM, RequestType
def load_yaml_template(template_path: Path) -> Dict: