diff --git a/main.py b/main.py index b1a5fed..af2af52 100644 --- a/main.py +++ b/main.py @@ -25,6 +25,7 @@ for filename in os.listdir(directory): cv2.waitKey(1) manpage = input("please input the number on the page (if the title is correct, enter nothing)") print(manpage) + #check if the new name already exists if manpage == "\n": rng = numpy.random.default_rng().random() os.rename (f'images/{data}.jpg', f'images/{data}.review-{rng}.jpg')