Update app.py
Browse filestry just generated 1 image
app.py
CHANGED
@@ -58,10 +58,10 @@ def infer(prompts, negative_prompts, image):
|
|
58 |
num_inference_steps=50,
|
59 |
neg_prompt_ids=negative_prompt_ids,
|
60 |
jit=True,
|
61 |
-
).images
|
62 |
|
63 |
-
output_images = pipe.numpy_to_pil(np.asarray(output.reshape((num_samples,) + output.shape[-3:])))
|
64 |
-
return output_images
|
65 |
|
66 |
with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
67 |
gr.Markdown(
|
@@ -82,10 +82,13 @@ with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
|
82 |
with gr.Column():
|
83 |
#keypoint_tool = addp5sketch(sketch_url)
|
84 |
keypoint_tool = gr.HTML(lines)
|
|
|
|
|
|
|
85 |
|
86 |
-
run_btn.click(fn=infer, inputs = ["prompts", "negative_prompts", "conditioning_image"], outputs =
|
87 |
|
88 |
-
#gr.Interface(fn=infer, inputs = ["text", "text", "image"], outputs =
|
89 |
#examples=[["a Labrador crossing the road", "low quality", "myimage.jpg"]])
|
90 |
|
91 |
#with gr.Row():
|
|
|
58 |
num_inference_steps=50,
|
59 |
neg_prompt_ids=negative_prompt_ids,
|
60 |
jit=True,
|
61 |
+
).images[0]
|
62 |
|
63 |
+
#output_images = pipe.numpy_to_pil(np.asarray(output.reshape((num_samples,) + output.shape[-3:])))
|
64 |
+
#return output_images
|
65 |
|
66 |
with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
67 |
gr.Markdown(
|
|
|
82 |
with gr.Column():
|
83 |
#keypoint_tool = addp5sketch(sketch_url)
|
84 |
keypoint_tool = gr.HTML(lines)
|
85 |
+
output = gr.Image(
|
86 |
+
label="Result",
|
87 |
+
)
|
88 |
|
89 |
+
run_btn.click(fn=infer, inputs = ["prompts", "negative_prompts", "conditioning_image"], outputs = output)
|
90 |
|
91 |
+
#gr.Interface(fn=infer, inputs = ["text", "text", "image"], outputs = output,
|
92 |
#examples=[["a Labrador crossing the road", "low quality", "myimage.jpg"]])
|
93 |
|
94 |
#with gr.Row():
|