From cd4ca278d45f30d89db964f404996da5c5ea9365 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 15 Jun 2026 10:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=8E=A5=E5=8F=A31=20?= =?UTF-8?q?=E5=92=8C=E6=8E=A5=E5=8F=A32=EF=BC=8C=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B9=9F=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gateway/config.example.json | 2 +- gateway/config.py | 2 +- nginx/hair.conf | 4 +- static/test_interface2.html | 195 ++++++++++++++++++++++++++++++++ static/test_interface3.html | 205 ++++++++++++++++++++++++++++++++++ static/test_interface5.html | 214 ++++++++++++++++++++++++++++++++++++ 6 files changed, 618 insertions(+), 4 deletions(-) create mode 100644 static/test_interface2.html create mode 100644 static/test_interface3.html create mode 100644 static/test_interface5.html 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形/直线/倒弧  |  返回中心点坐标(原图像素)
+ +
+
+ + +
+ + + +