import gradio as gr # Load the model model = gr.load("models/stabilityai/stable-diffusion-3.5-large") # Define a function to handle the model inference def generate_image(prompt): return model(prompt=prompt) # Define the Gradio interface interface = gr.Interface( fn=generate_image, # The prediction function inputs=[ gr.Textbox(label="Prompt"), # Input for the text prompt ], outputs=gr.Image(label="Generated Image") # Output component for the generated image ) # Launch the interface interface.launch()