File size: 679 Bytes
3ac8557
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73c34c3
f805a73
3ac8557
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
# coding: utf-8
import os
from glob import glob
import gradio as gr


block = gr.Blocks(css=".container { max-width: 800px; margin: auto; }")


def infer():
    images = glob('*.png') + glob('*.jpg') + glob('*.jpeg')+ glob('*.gif')
    return images
    
with block:
    with gr.Group():
        with gr.Box():
            gallery=gr.Gallery(label="Hugging Gallery")
            block.load(infer, inputs=None, outputs=gallery)
            
block.launch()



#import streamlit as st
#from glob import glob
#logos = glob('*.png') + glob('*.jpg') + glob('*.jpeg')+ glob('*.gif')
#
#cols=st.columns(4)
#for i,logo in enumerate(logos):
#    cols[i%4].image(logo)