Commit 574de0ec authored by zhengyaoqiu's avatar zhengyaoqiu

优化

parent 574392f9
......@@ -41,6 +41,10 @@ class ImageUpload:
key = image2key["key"]
part = image2key["part"]
vector = self.feature_extractor.extract_from_url(image, part)
# 如果 vector 是 None 则跳过
if vector is None:
print(f"Warning: Failed to extract vector for image {image}, key {key}")
continue
images.append(image)
keys.append(key)
vectors.append(vector)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment