init
Browse files
app.py
CHANGED
@@ -116,7 +116,7 @@ def run(
|
|
116 |
opt,
|
117 |
detector,
|
118 |
predictor,
|
119 |
-
) -> tuple[PIL.Image.Image,PIL.Image.Image,PIL.Image.Image,PIL.Image.Image]:
|
120 |
dataroot = 'images/' + compress_UUID()
|
121 |
opt.dataroot = os.path.join(dataroot, 'src/')
|
122 |
os.makedirs(opt.dataroot, exist_ok=True)
|
@@ -161,7 +161,7 @@ def run(
|
|
161 |
# # print('processing (%04d)-th image... %s' % (i, img_path))
|
162 |
# imgs = save_images2(opt.results_dir, visuals, img_path, aspect_ratio=opt.aspect_ratio, width=opt.display_winsize)
|
163 |
#
|
164 |
-
|
165 |
|
166 |
return PIL.Image.open(imgs[0]),PIL.Image.open(imgs[1]),PIL.Image.open(imgs[2]),PIL.Image.open(imgs[3])
|
167 |
|
@@ -217,6 +217,15 @@ def main():
|
|
217 |
gr.outputs.Image(
|
218 |
type='pil',
|
219 |
label='Result'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
],
|
221 |
# examples=examples,
|
222 |
theme=args.theme,
|
|
|
116 |
opt,
|
117 |
detector,
|
118 |
predictor,
|
119 |
+
) -> tuple[PIL.Image.Image,PIL.Image.Image,PIL.Image.Image,PIL.Image.Image,]:
|
120 |
dataroot = 'images/' + compress_UUID()
|
121 |
opt.dataroot = os.path.join(dataroot, 'src/')
|
122 |
os.makedirs(opt.dataroot, exist_ok=True)
|
|
|
161 |
# # print('processing (%04d)-th image... %s' % (i, img_path))
|
162 |
# imgs = save_images2(opt.results_dir, visuals, img_path, aspect_ratio=opt.aspect_ratio, width=opt.display_winsize)
|
163 |
#
|
164 |
+
print(imgs)
|
165 |
|
166 |
return PIL.Image.open(imgs[0]),PIL.Image.open(imgs[1]),PIL.Image.open(imgs[2]),PIL.Image.open(imgs[3])
|
167 |
|
|
|
217 |
gr.outputs.Image(
|
218 |
type='pil',
|
219 |
label='Result'),
|
220 |
+
gr.outputs.Image(
|
221 |
+
type='pil',
|
222 |
+
label='Result'),
|
223 |
+
gr.outputs.Image(
|
224 |
+
type='pil',
|
225 |
+
label='Result'),
|
226 |
+
gr.outputs.Image(
|
227 |
+
type='pil',
|
228 |
+
label='Result'),
|
229 |
],
|
230 |
# examples=examples,
|
231 |
theme=args.theme,
|