Update app.py
Browse filesCentering title
Adding back wand report
app.py
CHANGED
@@ -12,7 +12,7 @@ def create_key(seed=0):
|
|
12 |
return jax.random.PRNGKey(seed)
|
13 |
|
14 |
def addp5sketch(url):
|
15 |
-
iframe = f'<iframe src ={url} style="border:none;height:
|
16 |
return gr.HTML(iframe)
|
17 |
|
18 |
def wandb_report(url):
|
@@ -72,9 +72,12 @@ def infer(prompts, negative_prompts, image):
|
|
72 |
with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
73 |
gr.Markdown(
|
74 |
"""
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
78 |
""")
|
79 |
with gr.Row():
|
80 |
with gr.Column():
|
@@ -82,18 +85,19 @@ with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
|
82 |
negative_prompts = gr.Textbox(label="Negative Prompt", value="lowres, bad muzzle, bad anatomy, missing ears, missing paws")
|
83 |
conditioning_image = gr.Image(label="Conditioning Image")
|
84 |
run_btn = gr.Button("Run")
|
|
|
85 |
with gr.Column():
|
86 |
keypoint_tool = addp5sketch(sketch_url)
|
87 |
output = gr.Image(
|
88 |
label="Result",
|
89 |
)
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
|
98 |
#run_btn.click(fn=infer, title = mytitle, description = mydescription, inputs = [prompts, negative_prompts, conditioning_image], outputs = output)
|
99 |
run_btn.click(fn=infer, inputs = [prompts, negative_prompts, conditioning_image], outputs = output)
|
@@ -101,8 +105,5 @@ with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
|
101 |
#gr.Interface(fn=infer, inputs = ["text", "text", "image"], outputs = output,
|
102 |
#examples=[["a Labrador crossing the road", "low quality", "myimage.jpg"]])
|
103 |
|
104 |
-
#with gr.Row():
|
105 |
-
# report = wandb_report(report_url)
|
106 |
-
|
107 |
|
108 |
demo.launch(debug=True)
|
|
|
12 |
return jax.random.PRNGKey(seed)
|
13 |
|
14 |
def addp5sketch(url):
|
15 |
+
iframe = f'<iframe src ={url} style="border:none;height:495px;width:100%"/frame>'
|
16 |
return gr.HTML(iframe)
|
17 |
|
18 |
def wandb_report(url):
|
|
|
72 |
with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
73 |
gr.Markdown(
|
74 |
"""
|
75 |
+
<h1 style="text-align: center;">
|
76 |
+
Animal Pose Control Net
|
77 |
+
</h1>
|
78 |
+
|
79 |
+
<h3 style="text-align: center;"> This is a demo of Animal Pose ControlNet, which is a model trained on runwayml/stable-diffusion-v1-5 with new type of conditioning.
|
80 |
+
</h3>
|
81 |
""")
|
82 |
with gr.Row():
|
83 |
with gr.Column():
|
|
|
85 |
negative_prompts = gr.Textbox(label="Negative Prompt", value="lowres, bad muzzle, bad anatomy, missing ears, missing paws")
|
86 |
conditioning_image = gr.Image(label="Conditioning Image")
|
87 |
run_btn = gr.Button("Run")
|
88 |
+
wandb = wandb_report(report_url)
|
89 |
with gr.Column():
|
90 |
keypoint_tool = addp5sketch(sketch_url)
|
91 |
output = gr.Image(
|
92 |
label="Result",
|
93 |
)
|
94 |
+
gr.Markdown(
|
95 |
+
"""
|
96 |
+
[Dataset](https://huggingface.co/datasets/JFoz/dog-poses-controlnet-dataset)
|
97 |
+
[Diffusers model](https://huggingface.co/JFoz/dog-pose)
|
98 |
+
[Github](https://github.com/fi4cr/animalpose)
|
99 |
+
[Training Report](https://wandb.ai/john-fozard/dog-cat-pose/runs/kmwcvae5)
|
100 |
+
""")
|
101 |
|
102 |
#run_btn.click(fn=infer, title = mytitle, description = mydescription, inputs = [prompts, negative_prompts, conditioning_image], outputs = output)
|
103 |
run_btn.click(fn=infer, inputs = [prompts, negative_prompts, conditioning_image], outputs = output)
|
|
|
105 |
#gr.Interface(fn=infer, inputs = ["text", "text", "image"], outputs = output,
|
106 |
#examples=[["a Labrador crossing the road", "low quality", "myimage.jpg"]])
|
107 |
|
|
|
|
|
|
|
108 |
|
109 |
demo.launch(debug=True)
|