diff --git a/gateway/config.example.json b/gateway/config.example.json index 63519c5..04f6024 100644 --- a/gateway/config.example.json +++ b/gateway/config.example.json @@ -16,7 +16,7 @@ "dispatch": { "per_worker_concurrency": 1, "queue_wait_seconds": 30, - "request_timeout_seconds": 60, + "request_timeout_seconds": 600, "retry_on_failure": true, "max_retries": 1 }, diff --git a/gateway/config.py b/gateway/config.py index 3905a51..f9be687 100644 --- a/gateway/config.py +++ b/gateway/config.py @@ -25,7 +25,7 @@ DEFAULTS = { "dispatch": { "per_worker_concurrency": 1, "queue_wait_seconds": 30, - "request_timeout_seconds": 60, + "request_timeout_seconds": 600, "retry_on_failure": True, "max_retries": 1, }, diff --git a/nginx/hair.conf b/nginx/hair.conf index 0caa3ab..c73ad54 100644 --- a/nginx/hair.conf +++ b/nginx/hair.conf @@ -11,7 +11,7 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_read_timeout 90s; - proxy_send_timeout 90s; + proxy_read_timeout 600s; + proxy_send_timeout 600s; } } diff --git a/static/test_interface2.html b/static/test_interface2.html new file mode 100644 index 0000000..c5b8c32 --- /dev/null +++ b/static/test_interface2.html @@ -0,0 +1,195 @@ + + + + + +接口2 — C端生发 测试页 + + + +
+

💇 接口2 — C端生发 测试

+

POST /api/v1/hair/grow  |  正面照 + 性别 → 每个方案展示:原图 / 发际线叠加 / 生发效果

+ +
+
+
+
+
+ + +
+ + +
+
JPG/PNG ≤1MB  |  生发图生成较慢(数十秒~数分钟),请耐心等待
+ +
+
+ + +
+ + + + diff --git a/static/test_interface3.html b/static/test_interface3.html new file mode 100644 index 0000000..6a5d30d --- /dev/null +++ b/static/test_interface3.html @@ -0,0 +1,205 @@ + + + + + +接口3 — B端生发 测试页 + + + +
+

🏥 接口3 — B端生发 测试

+

POST /api/v1/hair/grow-b  |  医生划线图 + 原图 → 最佳发际线 + 生发效果

+ +
+
+
+
+
✏️ 划线图(marked_image)必填
+ +
+
+
📷 原始照片(original_image)必填
+ +
+
+
+ + +
+
两张图都必填,各 ≤1MB  |  划线图 = 医生在原图上标了目标发际线的图片
+ +
+
+ + +
+ + + + diff --git a/static/test_interface5.html b/static/test_interface5.html new file mode 100644 index 0000000..696f7f0 --- /dev/null +++ b/static/test_interface5.html @@ -0,0 +1,214 @@ + + + + + +接口5 — 发际线PNG生成 测试页 + + + +
+

💈 接口5 — 发际线 PNG 生成 测试

+

POST /api/v1/hairline/generate  |  上传正面照 + 性别 → N 张发际线叠加图 + 最佳中心点坐标

+ +
+
+
+
+
+ + +
+ + +
+
JPG/PNG 正面照,≤1MB  |  Female: 椭圆/花瓣/心形/直线/波浪  |  Male: 椭圆/M形/直线/倒弧  |  返回中心点坐标(原图像素)
+ +
+
+ + +
+ + + +