gradio_example / app.py
merve's picture
merve HF Staff
Update app.py
64f3730
raw
history blame contribute delete
609 Bytes
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
im = Image.open("cat_image.jpeg")
return im
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()