Spaces:
Runtime error
Runtime error
| import os | |
| import gradio as gr | |
| from gradio_carousel import Carousel | |
| image_dir = os.path.join(os.path.dirname(__file__), "alligator_images") | |
| images = [os.path.join(image_dir, file) for file in os.listdir(image_dir) if file.endswith((".jpg", ".jpeg", ".png"))] | |
| with gr.Blocks() as demo: | |
| with gr.Row(): | |
| Carousel(label="cool gators", value=images) # carousel component with images | |
| if __name__ == "__main__": | |
| demo.launch() | |