Spaces:
Runtime error
Runtime error
File size: 696 Bytes
e8feed3 eddf472 c825910 8f773c7 c825910 eddf472 e8feed3 dfdf08e e8feed3 2d77599 473089a c825910 2d77599 dfdf08e 473089a 61bd713 dfdf08e c825910 2d77599 82ee964 |
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 32 |
import gradio as gr
import numpy as np
def initiate(images_num):
zeros = np.zeros([256,256,3], dtype=np.uint8)
zeros.fill(255)
img_array = []
for i in range(images_num):
img_array.append(zeros)
demo = gr.Blocks()
with demo:
images_num = gr.inputs.Slider(default=1, label="Num Images", minimum=1, maximum=16, step=1)
#interpolate = gr.inputs.Checkbox(default=False, label="Interpolate")
submit = gr.Button("Generate")
out = gr.Gallery()
submit.click(fn=initiate,
#inputs=[images_num, interpolate],
inputs=images_num
outputs=out)
demo.launch(enable_queue =True) |