File size: 642 Bytes
2692b6e
 
 
 
 
 
 
 
 
 
dbc73d9
2692b6e
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
​
# inference function takes prompt, negative prompt and image
def infer(image, prompt):
    # implement your inference function here
    output_image = image
    return output_image
​
title = "ControlNet for Cartoon-ifying"
description = "This is a demo on ControlNet for changing images of people into cartoons of different styles."
examples = [["./simpsons_human_1.jpg", "turn into a simpsons character", "./simpsons_animated_1.jpg"]]
​
gr.Interface(fn = infer, inputs = ["image", "text"], outputs = "image",
            title = title, description = description, examples = examples, theme='gradio/soft').launch()