Spaces:
Runtime error
Runtime error
Configure default arguments
Browse files
app.py
CHANGED
@@ -41,8 +41,17 @@ def resize_image(input_path, output_path, target_height):
|
|
41 |
|
42 |
|
43 |
@spaces.GPU(duration=90)
|
44 |
-
def infer(
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
# Canny preprocessing
|
47 |
image_to_canny = load_image(image_in)
|
48 |
image_to_canny = np.array(image_to_canny)
|
@@ -69,6 +78,7 @@ def infer(image_in, prompt, negative_prompt, inference_steps, guidance_scale, co
|
|
69 |
return image, gr.update(value=image_to_canny, visible=True)
|
70 |
|
71 |
|
|
|
72 |
css = """
|
73 |
#col-container{
|
74 |
margin: 0 auto;
|
|
|
41 |
|
42 |
|
43 |
@spaces.GPU(duration=90)
|
44 |
+
def infer(
|
45 |
+
image_in,
|
46 |
+
prompt,
|
47 |
+
negative_prompt="",
|
48 |
+
inference_steps=25,
|
49 |
+
guidance_scale=7.0,
|
50 |
+
control_weight=0.7,
|
51 |
+
low_threshold=100,
|
52 |
+
high_threshold=200,
|
53 |
+
progress=gr.Progress(track_tqdm=True)
|
54 |
+
):
|
55 |
# Canny preprocessing
|
56 |
image_to_canny = load_image(image_in)
|
57 |
image_to_canny = np.array(image_to_canny)
|
|
|
78 |
return image, gr.update(value=image_to_canny, visible=True)
|
79 |
|
80 |
|
81 |
+
|
82 |
css = """
|
83 |
#col-container{
|
84 |
margin: 0 auto;
|