From ebb7873c0a1dcac9763231cbbbdd75b4a50b14ee Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Fri, 21 Jun 2024 10:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/photo_review.py | 2 -- test.py | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 test.py diff --git a/photo_review/photo_review.py b/photo_review/photo_review.py index 4b8f1a1..2d64a11 100644 --- a/photo_review/photo_review.py +++ b/photo_review/photo_review.py @@ -2,7 +2,6 @@ import json import logging import math import os -import pdb import sys import tempfile import time @@ -97,7 +96,6 @@ def information_extraction(ie, phrecs): for phrec in phrecs: pic_path = ucloud.get_private_url(phrec.cfjaddress) if pic_path: - pdb.set_trace() split_result = split_image(pic_path) for img in split_result: with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as temp_file: diff --git a/test.py b/test.py new file mode 100644 index 0000000..98ad7de --- /dev/null +++ b/test.py @@ -0,0 +1,7 @@ +from photo_review.photo_review import open_image_from_url +from ucloud import ucloud + +if __name__ == '__main__': + pic_path = ucloud.get_private_url("PH20240529000194_1_075936_1.PNG") + image = open_image_from_url(pic_path) + image.save("test.png")