Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ from datasets import Dataset
|
|
7 |
from PIL import Image
|
8 |
import io
|
9 |
import uuid
|
10 |
-
import shutil
|
11 |
|
12 |
DATA_DIR = "/data"
|
13 |
IMAGES_DIR = os.path.join(DATA_DIR, "images")
|
@@ -140,7 +139,7 @@ with gr.Blocks(theme="huggingface") as iface:
|
|
140 |
dataset_info = gr.Textbox(label="Dataset Info", value=dataset_builder.get_dataset_info())
|
141 |
|
142 |
gr.Markdown("## Dataset Preview")
|
143 |
-
preview_gallery = gr.Gallery(label="Recent Additions", show_label=False, elem_id="preview_gallery"
|
144 |
|
145 |
add_button.click(add_image_to_dataset, inputs=url_input, outputs=[result_output, dataset_info, preview_gallery])
|
146 |
|
@@ -149,7 +148,7 @@ with gr.Blocks(theme="huggingface") as iface:
|
|
149 |
create_hf_button.click(create_huggingface_dataset, inputs=[], outputs=hf_result)
|
150 |
|
151 |
view_dataset_button = gr.Button("View Dataset")
|
152 |
-
dataset_gallery = gr.Gallery(label="Dataset Contents", show_label=False, elem_id="dataset_gallery"
|
153 |
view_dataset_button.click(view_dataset, inputs=[], outputs=dataset_gallery)
|
154 |
|
155 |
# Launch the interface
|
|
|
7 |
from PIL import Image
|
8 |
import io
|
9 |
import uuid
|
|
|
10 |
|
11 |
DATA_DIR = "/data"
|
12 |
IMAGES_DIR = os.path.join(DATA_DIR, "images")
|
|
|
139 |
dataset_info = gr.Textbox(label="Dataset Info", value=dataset_builder.get_dataset_info())
|
140 |
|
141 |
gr.Markdown("## Dataset Preview")
|
142 |
+
preview_gallery = gr.Gallery(label="Recent Additions", show_label=False, elem_id="preview_gallery", columns=5, rows=1, height="auto")
|
143 |
|
144 |
add_button.click(add_image_to_dataset, inputs=url_input, outputs=[result_output, dataset_info, preview_gallery])
|
145 |
|
|
|
148 |
create_hf_button.click(create_huggingface_dataset, inputs=[], outputs=hf_result)
|
149 |
|
150 |
view_dataset_button = gr.Button("View Dataset")
|
151 |
+
dataset_gallery = gr.Gallery(label="Dataset Contents", show_label=False, elem_id="dataset_gallery", columns=5, rows=4, height="auto")
|
152 |
view_dataset_button.click(view_dataset, inputs=[], outputs=dataset_gallery)
|
153 |
|
154 |
# Launch the interface
|