From 82ecdf13fa56a7757f26a1eed79499c3f7bc26e5 Mon Sep 17 00:00:00 2001
From: shidong <shidong@jhsoft.cc>
Date: 星期二, 08 七月 2025 19:00:10 +0800
Subject: [PATCH] #2025/7/8 #新增qwen_detect_batch.py和qwen_thread_batch.py测试批量处理图片, #在qwen_thread.py和qwen_thread_batch.py中 新增了预警之后查询隐患描述与处理建议, #新增了隐患描述的接口名称:image_rule_chat_with_detail #新增了处理建议的接口名称:image_rule_chat_suggestion #数据库增加了risk_description与suggestion字段
---
qwen_detect_batch.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/qwen_detect_batch.py b/qwen_detect_batch.py
index 6389eb6..b79cb3c 100644
--- a/qwen_detect_batch.py
+++ b/qwen_detect_batch.py
@@ -106,7 +106,7 @@
if len(res_a) > 0:
sorted_results = sorted(res_a, key=itemgetter("id"), reverse=True)
# 鏌ヨ鍓峃涓渶澶х殑ID
- res_a = sorted_results[:int(self.config.get("detectnum"))-1]
+ res_a = sorted_results[:int(self.config.get("detectnum"))]
res_data = []
for res in res_a:
data = {
@@ -136,7 +136,6 @@
image_id = self.collection.upsert(data).primary_keys
res['id'] = image_id[0]
res_data.append(res)
- # logging.info(f"璇诲彇鍥惧儚鎴愬姛: {image_id}")
self.pool.submit(res_data)
# image_id = pool.tark_do(image_id,self.config.get("ragurl"),self.config.get("ragmode"),self.config.get("max_tokens"))
# logging.info(f"澶勭悊鍥惧儚鎴愬姛: {image_id}")
--
Gitblit v1.8.0