模型微调已经调通

增加了参数预览
This commit is contained in:
2026-01-28 10:31:09 +08:00
parent 8a638b6372
commit a560d24e2f
8 changed files with 898 additions and 96 deletions

View File

@@ -6,8 +6,12 @@ import pymysql
import yaml
from flask import Blueprint, request, jsonify
# 获取项目根目录
# 获取项目根目录 - 优先使用环境变量,否则从文件路径计算
MOUNT_BASE = os.environ.get('MOUNT_BASE', '/app/base')
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# 如果 PROJECT_ROOT 是 /app 或 /app/src/llamafactory则使用挂载路径
if PROJECT_ROOT in ('/app', '/app/src/llamafactory'):
PROJECT_ROOT = MOUNT_BASE
# 创建蓝图
model_manage_bp = Blueprint('model_manage', __name__, url_prefix='/api/model-manage')