chore: 更新脚本并且修改gitignore

This commit is contained in:
2026-04-02 15:40:31 +08:00
parent 475de51c7d
commit 912d7c7f54
6 changed files with 17 additions and 12 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
from pathlib import Path
from huggingface_hub import snapshot_download
PROJECT_ROOT = Path(__file__).parent.parent
PROJECT_ROOT = Path(__file__).resolve().parents[2]
PARAMETER_ROOT = Path(PROJECT_ROOT, "params")
if __name__ == "__main__":
+1 -1
View File
@@ -3,7 +3,7 @@ from pathlib import Path
from astrai.config.param_config import ModelParameter
from astrai.inference.generator import GeneratorFactory, GenerationRequest
PROJECT_ROOT = Path(__file__).parent.parent
PROJECT_ROOT = Path(__file__).resolve().parents[2]
PARAMETER_ROOT = Path(PROJECT_ROOT, "params")
+1 -1
View File
@@ -3,7 +3,7 @@ from pathlib import Path
from astrai.config.param_config import ModelParameter
from astrai.inference.generator import GeneratorFactory, GenerationRequest
PROJECT_ROOT = Path(__file__).parent.parent
PROJECT_ROOT = Path(__file__).resolve().parents[2]
PARAMETER_ROOT = Path(PROJECT_ROOT, "params")
+2 -1
View File
@@ -3,7 +3,7 @@ from pathlib import Path
from astrai.config.param_config import ModelParameter
from astrai.inference.generator import GeneratorFactory, GenerationRequest
PROJECT_ROOT = Path(__file__).parent.parent
PROJECT_ROOT = Path(__file__).resolve().parents[2]
PARAMETER_ROOT = Path(PROJECT_ROOT, "params")
@@ -25,6 +25,7 @@ def chat():
max_len=param.config.max_len,
history=history,
system_prompt=None,
stream=True,
)
generator = GeneratorFactory.create(param, request)