add progress
Browse files
app.py
CHANGED
@@ -43,6 +43,8 @@ def picker_color_to_rgba(picker_color):
|
|
43 |
innner_eyes_blur - inner eyes blur
|
44 |
iris_mask_blur - final iris edge blur
|
45 |
'''
|
|
|
|
|
46 |
def process_images(image,eyes_slide_x_ratio,eyes_slide_y_ratio,innner_eyes_blur_ratio=0.1,iris_mask_blur_ratio=0.1,pupil_offset_ratio=0.08,draw_eye_pupil_ratio=1.1,iris_color_value="rgba(20,20,20,255)",eyes_white_erode_ratio=0.2,eyes_ball_mask_ratio=0.9,
|
47 |
output_important_only=True,progress=gr.Progress(track_tqdm=True)):
|
48 |
clear_old_files()
|
@@ -116,7 +118,13 @@ def process_images(image,eyes_slide_x_ratio,eyes_slide_y_ratio,innner_eyes_blur_
|
|
116 |
eyes_mask_image = white_image.convert("L") #eyes-white-area-hole painted black
|
117 |
|
118 |
galleries = []
|
|
|
|
|
|
|
119 |
def add_webp(add_image,label,important=False):
|
|
|
|
|
|
|
120 |
if important ==False and output_important_only == True:
|
121 |
return
|
122 |
|
|
|
43 |
innner_eyes_blur - inner eyes blur
|
44 |
iris_mask_blur - final iris edge blur
|
45 |
'''
|
46 |
+
|
47 |
+
|
48 |
def process_images(image,eyes_slide_x_ratio,eyes_slide_y_ratio,innner_eyes_blur_ratio=0.1,iris_mask_blur_ratio=0.1,pupil_offset_ratio=0.08,draw_eye_pupil_ratio=1.1,iris_color_value="rgba(20,20,20,255)",eyes_white_erode_ratio=0.2,eyes_ball_mask_ratio=0.9,
|
49 |
output_important_only=True,progress=gr.Progress(track_tqdm=True)):
|
50 |
clear_old_files()
|
|
|
118 |
eyes_mask_image = white_image.convert("L") #eyes-white-area-hole painted black
|
119 |
|
120 |
galleries = []
|
121 |
+
|
122 |
+
progressed = 0
|
123 |
+
|
124 |
def add_webp(add_image,label,important=False):
|
125 |
+
nonlocal progressed
|
126 |
+
progressed += .038
|
127 |
+
progress(progressed)
|
128 |
if important ==False and output_important_only == True:
|
129 |
return
|
130 |
|