Spaces:
Sleeping
Sleeping
modify: display image size 224 to 64
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ from utils import base64_to_image, image_to_base64
|
|
| 12 |
##### Image database
|
| 13 |
root_dir = os.path.join(os.getcwd(), "data")
|
| 14 |
jpg_files = glob.glob(os.path.join(root_dir, "**", "*.jpg"), recursive=True)
|
| 15 |
-
IMAGE_DATABASE = [Image.open(f).resize((
|
| 16 |
|
| 17 |
|
| 18 |
def display_image_database():
|
|
@@ -27,7 +27,7 @@ def display_sample_images():
|
|
| 27 |
|
| 28 |
images = []
|
| 29 |
for i, img in enumerate(sample_images):
|
| 30 |
-
images.append(Image.open(os.path.join(sample_img_path, img)).resize((
|
| 31 |
|
| 32 |
st.image(images)
|
| 33 |
|
|
|
|
| 12 |
##### Image database
|
| 13 |
root_dir = os.path.join(os.getcwd(), "data")
|
| 14 |
jpg_files = glob.glob(os.path.join(root_dir, "**", "*.jpg"), recursive=True)
|
| 15 |
+
IMAGE_DATABASE = [Image.open(f).resize((64, 64)) for f in jpg_files]
|
| 16 |
|
| 17 |
|
| 18 |
def display_image_database():
|
|
|
|
| 27 |
|
| 28 |
images = []
|
| 29 |
for i, img in enumerate(sample_images):
|
| 30 |
+
images.append(Image.open(os.path.join(sample_img_path, img)).resize((64, 64)))
|
| 31 |
|
| 32 |
st.image(images)
|
| 33 |
|