INNER CODE UNIT · Python

show_gallery

FoundationVision/Liquid · evaluation/app.py:186

def show_gallery(images):
    gallery = gr.Gallery(images, label="Gallery", columns=4, height="auto",preview=True,scale=0.05)  # 设置两行两列的布局
    return gallery

def bot_streaming_T2I(message, history,guidance_scale, temperature, top_K, top_P):
 
    global stop_flag
    stop_flag = True
    time.sleep(0.2)
    stop_flag = False
    
    text_inputs = [message]*4  # generate 4 samples once
    uncondition_text_inputs = ['<unconditional><boi>']*len(text_inputs)
    for i in range(len(text_inputs)):
        text_inputs[i] = text_inputs[i]+' Generate an image based on this description.<boi>'

    ori_batchsize = len(text_inputs)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…