File size: 785 Bytes
a2152cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
from PIL import Image
from utils import generate_gradio_images

# Create a Gradio interface
iface = gr.Interface(
    fn=generate_gradio_images,  # Set to None since we won't use a function
    inputs=[
        gr.Textbox("Enter Prompt"),
        gr.Slider("Time Stamps", value=1, step=1, maximum=50),
        gr.Checkbox(label = "Use custom loss",value=False)
    ],
    outputs=[gr.Image(type="pil", height=512, width = 512),
             gr.Image(type="pil", height=512, width = 512), 
             gr.Image(type="pil", height=512, width = 512), 
             gr.Image(type="pil", height=512, width = 512),
             gr.Image(type="pil", height=512, width = 512)]  # Gradio Image component for displaying images
)

# Launch the Gradio interface
iface.launch()