Spaces:
Runtime error
Runtime error
Beamlnwza commited on
Commit ·
8accc5d
1
Parent(s): 80e42c7
added more images
Browse files- app.py +9 -9
- images/REAL_00000 (1).png +0 -0
- images/REAL_00000.png +0 -0
- images/REAL_00001.png +0 -0
- images/REAL_00002 (1).png +0 -0
- images/REAL_00002.png +0 -0
- images/REAL_00003.png +0 -0
- images/REAL_00004.png +0 -0
- images/REAL_00010.png +0 -0
- images/REAL_00012 (1).png +0 -0
- images/REAL_00012.png +0 -0
- images/REAL_00016.png +0 -0
- images/REAL_00018.png +0 -0
- images/REAL_00021.png +0 -0
- images/REAL_00029.png +0 -0
- images/REAL_00041.png +0 -0
app.py
CHANGED
|
@@ -1,6 +1,14 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import imgaug.augmenters as iaa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
aug_seq = iaa.Sequential([
|
| 6 |
iaa.Resize({"height": 224, "width": 224}),
|
|
@@ -27,13 +35,5 @@ demo = gr.Interface(
|
|
| 27 |
aug_img,
|
| 28 |
gr.Image(type="numpy"),
|
| 29 |
"image",
|
| 30 |
-
examples=
|
| 31 |
-
os.path.join(os.path.dirname(__file__), "images/1.png"),
|
| 32 |
-
os.path.join(os.path.dirname(__file__), "images/2.png"),
|
| 33 |
-
os.path.join(os.path.dirname(__file__), "images/3.png"),
|
| 34 |
-
os.path.join(os.path.dirname(__file__), "images/4.png"),
|
| 35 |
-
os.path.join(os.path.dirname(__file__), "images/5.png"),
|
| 36 |
-
os.path.join(os.path.dirname(__file__), "images/6.png"),
|
| 37 |
-
|
| 38 |
-
],
|
| 39 |
).launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import imgaug.augmenters as iaa
|
| 4 |
+
import glob
|
| 5 |
+
|
| 6 |
+
image_dir = os.path.join(os.path.dirname(__file__), "images")
|
| 7 |
+
image_files = glob.glob(os.path.join(image_dir, "*.png"))
|
| 8 |
+
|
| 9 |
+
examples = []
|
| 10 |
+
for image_file in image_files:
|
| 11 |
+
examples.append(image_file)
|
| 12 |
|
| 13 |
aug_seq = iaa.Sequential([
|
| 14 |
iaa.Resize({"height": 224, "width": 224}),
|
|
|
|
| 35 |
aug_img,
|
| 36 |
gr.Image(type="numpy"),
|
| 37 |
"image",
|
| 38 |
+
examples=examples,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
).launch()
|
images/REAL_00000 (1).png
ADDED
|
images/REAL_00000.png
ADDED
|
images/REAL_00001.png
ADDED
|
images/REAL_00002 (1).png
ADDED
|
images/REAL_00002.png
ADDED
|
images/REAL_00003.png
ADDED
|
images/REAL_00004.png
ADDED
|
images/REAL_00010.png
ADDED
|
images/REAL_00012 (1).png
ADDED
|
images/REAL_00012.png
ADDED
|
images/REAL_00016.png
ADDED
|
images/REAL_00018.png
ADDED
|
images/REAL_00021.png
ADDED
|
images/REAL_00029.png
ADDED
|
images/REAL_00041.png
ADDED
|