Spaces:
Runtime error
Runtime error
tab event
Browse files- check_app.py +8 -2
check_app.py
CHANGED
|
@@ -263,7 +263,7 @@ def main():
|
|
| 263 |
output = gr.Textbox(label="Status")
|
| 264 |
img = gr.Image(label=model_name, height=300)
|
| 265 |
|
| 266 |
-
|
| 267 |
|
| 268 |
gallery = gr.Gallery(
|
| 269 |
label="Image Gallery",
|
|
@@ -273,7 +273,12 @@ def main():
|
|
| 273 |
height=600,
|
| 274 |
object_fit="contain"
|
| 275 |
)
|
| 276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
button.click(fn=create_pipeline_logic, inputs=[prompt_text, gr.Text(value= model_name,visible=False), negative_prompt,
|
| 278 |
seed,
|
| 279 |
randomize_seed,
|
|
@@ -303,6 +308,7 @@ def load_images_from_directory(directory_path):
|
|
| 303 |
Load all images from the specified directory.
|
| 304 |
Returns a list of image file paths.
|
| 305 |
"""
|
|
|
|
| 306 |
image_extensions = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp'}
|
| 307 |
directory = Path(directory_path)
|
| 308 |
|
|
|
|
| 263 |
output = gr.Textbox(label="Status")
|
| 264 |
img = gr.Image(label=model_name, height=300)
|
| 265 |
|
| 266 |
+
|
| 267 |
|
| 268 |
gallery = gr.Gallery(
|
| 269 |
label="Image Gallery",
|
|
|
|
| 273 |
height=600,
|
| 274 |
object_fit="contain"
|
| 275 |
)
|
| 276 |
+
|
| 277 |
+
tabs.select(
|
| 278 |
+
fn=load_images_from_directory,
|
| 279 |
+
inputs=[gr.Text(value= model_name,visible=False)],
|
| 280 |
+
outputs=[gallery],
|
| 281 |
+
)
|
| 282 |
button.click(fn=create_pipeline_logic, inputs=[prompt_text, gr.Text(value= model_name,visible=False), negative_prompt,
|
| 283 |
seed,
|
| 284 |
randomize_seed,
|
|
|
|
| 308 |
Load all images from the specified directory.
|
| 309 |
Returns a list of image file paths.
|
| 310 |
"""
|
| 311 |
+
print(f"Loading {directory_path}")
|
| 312 |
image_extensions = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp'}
|
| 313 |
directory = Path(directory_path)
|
| 314 |
|