File size: 652 Bytes
9428d65
019c1d0
9428d65
 
 
 
98e50cb
 
9428d65
 
b25e713
 
 
9428d65
b25e713
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from PIL import Image

# inference function takes prompt, negative prompt and image
def infer(prompt, negative_prompt, image):
    # implement your inference function here
    with Image.open("cat_image.jpeg") as im:
        output_image = im
    return output_image

title = "ControlNet on Canny Filter"
description = "This is a demo on ControlNet based on canny filter."

examples = [["a cat with cake texture", "low quality", "cat_image.jpeg"]]
gr.Interface(fn = infer, inputs = ["text", "text", "image"], outputs = "image",
            title = title, description = description, examples = examples, theme='gradio/soft').launch()