File size: 591 Bytes
d8eaf88
23e9852
d8eaf88
64360eb
e32d51c
d8eaf88
 
 
e32d51c
 
 
23e9852
cdcc96d
 
0a1c1a2
f980881
cdcc96d
0a1c1a2
e32d51c
cdcc96d
 
23e9852
cdcc96d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import gradio as gr

def update(slider, img):

    if not os.path.exists('temp'):
      os.system('mkdir temp')

    img.save("temp/image.jpg", "JPEG")

    return f'temp/image.jpg'

with gr.Blocks() as demo:
    gr.Markdown("Start typing below and then click **Run** to see the output.")
    inp = [gr.Slider(1,15, default = 2, label='StepCycles',step= 1)]
    
    with gr.Row():
        inp.append(gr.Image(type="pil", label="Input"))
        out = gr.Image(type="file", label="Output")
    btn = gr.Button("Run")
    btn.click(fn=update, inputs=inp, outputs=out)

demo.launch()