Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
# Inference function takes prompt, negative prompt and image
|
4 |
+
def infer(prompt, negative_prompt, image):
|
5 |
+
# Implement your inference function here for ControlNet-based Fill Circle
|
6 |
+
output_image = generate_fill_circle_image(prompt, negative_prompt, image) # Replace with your function
|
7 |
+
return output_image
|
8 |
+
|
9 |
+
title = "ControlNet on Fill Circle"
|
10 |
+
description = "This is a demo on ControlNet based on fill circle."
|
11 |
+
|
12 |
+
# You need to pass your examples according to your inputs
|
13 |
+
# Each inner list is one example, each element in the list corresponding to a component in the `inputs`.
|
14 |
+
examples = [["red circle with blue background", "cyan circle with brown floral background", None]]
|
15 |
+
|
16 |
+
gr.Interface(
|
17 |
+
fn = infer,
|
18 |
+
inputs = ["text", "text", "image"],
|
19 |
+
outputs = "image",
|
20 |
+
title = title,
|
21 |
+
description = description,
|
22 |
+
examples = examples,
|
23 |
+
theme='gradio/soft'
|
24 |
+
).launch()
|