Spaces:
Runtime error
Runtime error
#!/usr/bin/env python | |
import pathlib | |
import gradio as gr | |
paths = [ | |
path.as_posix() for path in sorted(pathlib.Path('images').rglob('*.jpg')) | |
] | |
with gr.Blocks() as demo: | |
gallery = gr.Gallery(value=paths, | |
columns=2, | |
rows=2, | |
height='600px', | |
object_fit='scale-down') | |
demo.queue().launch() | |