Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
title = "ControlNet on Canny Filter"
|
2 |
description = "This is a demo on ControlNet based on canny filter."
|
3 |
|
4 |
-
examples = [["a cat with cake texture", "low quality", "cat_image.
|
5 |
gr.Interface(fn = infer, inputs = ["text", "text", "image"], outputs = "image",
|
6 |
title = title, description = description, examples = examples, theme='gradio/soft').launch()
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import PIL
|
3 |
+
|
4 |
+
# inference function takes prompt, negative prompt and image
|
5 |
+
def infer(prompt, negative_prompt, image):
|
6 |
+
# implement your inference function here
|
7 |
+
output_image = PIL.Image("cat_image.jpeg")
|
8 |
+
return output_image
|
9 |
+
|
10 |
title = "ControlNet on Canny Filter"
|
11 |
description = "This is a demo on ControlNet based on canny filter."
|
12 |
|
13 |
+
examples = [["a cat with cake texture", "low quality", "cat_image.jpeg"]]
|
14 |
gr.Interface(fn = infer, inputs = ["text", "text", "image"], outputs = "image",
|
15 |
title = title, description = description, examples = examples, theme='gradio/soft').launch()
|