Spaces:
Running
Running
Fix examples order
Browse files
app.py
CHANGED
@@ -10,7 +10,6 @@ import dotenv
|
|
10 |
from gradio_imageslider import ImageSlider
|
11 |
from io import BytesIO
|
12 |
import base64
|
13 |
-
import glob
|
14 |
import numpy as np
|
15 |
|
16 |
dotenv.load_dotenv()
|
@@ -248,27 +247,10 @@ with gr.Blocks() as demo:
|
|
248 |
api_name=False,
|
249 |
)
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
]
|
256 |
-
output_examples = [
|
257 |
-
img.replace(".jpg", "") + "results.png" for img in images_examples
|
258 |
-
]
|
259 |
-
# examples = [
|
260 |
-
# [
|
261 |
-
# img,
|
262 |
-
# mask,
|
263 |
-
# (img, out),
|
264 |
-
# ]
|
265 |
-
# for img, mask, out in zip(images_examples, mask_examples, output_examples)
|
266 |
-
# ]
|
267 |
-
|
268 |
-
example1 = make_example(images_examples[0], mask_examples[0])
|
269 |
-
example2 = make_example(images_examples[1], mask_examples[1])
|
270 |
-
example3 = make_example(images_examples[2], mask_examples[2])
|
271 |
-
example4 = make_example(images_examples[3], mask_examples[3])
|
272 |
|
273 |
examples = [
|
274 |
[
|
|
|
10 |
from gradio_imageslider import ImageSlider
|
11 |
from io import BytesIO
|
12 |
import base64
|
|
|
13 |
import numpy as np
|
14 |
|
15 |
dotenv.load_dotenv()
|
|
|
247 |
api_name=False,
|
248 |
)
|
249 |
|
250 |
+
example1 = make_example("./examples/ex1.jpg", "./examples/ex1_mask_only.png")
|
251 |
+
example2 = make_example("./examples/ex2.jpg", "./examples/ex2_mask_only.png")
|
252 |
+
example3 = make_example("./examples/ex3.jpg", "./examples/ex3_mask_only.png")
|
253 |
+
example4 = make_example("./examples/ex4.jpg", "./examples/ex4_mask_only.png")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
|
255 |
examples = [
|
256 |
[
|