Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,6 +47,15 @@ css="""
|
|
| 47 |
max-width: 860px;
|
| 48 |
margin: 0 auto;
|
| 49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
"""
|
| 51 |
with gr.Blocks(css=css) as demo:
|
| 52 |
with gr.Column(elem_id="col-container"):
|
|
@@ -67,6 +76,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 67 |
with gr.Row():
|
| 68 |
with gr.Column():
|
| 69 |
image = gr.Image(type='filepath', sources=["upload"])
|
|
|
|
|
|
|
|
|
|
| 70 |
gr.Examples(
|
| 71 |
examples = [
|
| 72 |
"examples/IMG_1050.jpeg",
|
|
@@ -76,12 +88,14 @@ with gr.Blocks(css=css) as demo:
|
|
| 76 |
],
|
| 77 |
inputs = [image]
|
| 78 |
)
|
| 79 |
-
textbox = gr.Textbox(show_label=False, value="a person facing the camera, making a hand gesture, indoor")
|
| 80 |
-
seed = gr.Slider(label="Seed", minimum=0, maximum=1000000, value=42)
|
| 81 |
-
submit_btn = gr.Button("Submit")
|
| 82 |
-
|
| 83 |
with gr.Column():
|
| 84 |
output_image = gr.Image(label="Fixed hands result")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
submit_btn.click(fn=generate, inputs=[image, textbox, seed], outputs=[output_image])
|
| 87 |
|
|
|
|
| 47 |
max-width: 860px;
|
| 48 |
margin: 0 auto;
|
| 49 |
}
|
| 50 |
+
#project-links{
|
| 51 |
+
margin: 0 0 12px !important;
|
| 52 |
+
column-gap: 8px;
|
| 53 |
+
display: flex;
|
| 54 |
+
justify-content: center;
|
| 55 |
+
flex-wrap: nowrap;
|
| 56 |
+
flex-direction: row;
|
| 57 |
+
align-items: center;
|
| 58 |
+
}
|
| 59 |
"""
|
| 60 |
with gr.Blocks(css=css) as demo:
|
| 61 |
with gr.Column(elem_id="col-container"):
|
|
|
|
| 76 |
with gr.Row():
|
| 77 |
with gr.Column():
|
| 78 |
image = gr.Image(type='filepath', sources=["upload"])
|
| 79 |
+
textbox = gr.Textbox(show_label=False, value="a person facing the camera, making a hand gesture, indoor")
|
| 80 |
+
seed = gr.Slider(label="Seed", minimum=0, maximum=1000000, value=42)
|
| 81 |
+
submit_btn = gr.Button("Submit")
|
| 82 |
gr.Examples(
|
| 83 |
examples = [
|
| 84 |
"examples/IMG_1050.jpeg",
|
|
|
|
| 88 |
],
|
| 89 |
inputs = [image]
|
| 90 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
with gr.Column():
|
| 92 |
output_image = gr.Image(label="Fixed hands result")
|
| 93 |
+
gr.HTML("""
|
| 94 |
+
<p id="project-links" align="center">
|
| 95 |
+
<a href='https://github.com/wenquanlu/HandRefiner'><img src='https://img.shields.io/badge/Project-Page-Green'></a> <a href='https://arxiv.org/abs/2311.17957'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a>
|
| 96 |
+
</p>
|
| 97 |
+
<img src="https://github.com/wenquanlu/HandRefiner/raw/main/Figs/banner.png" style="margin: 0 auto;border-radius: 10px;" />
|
| 98 |
+
""")
|
| 99 |
|
| 100 |
submit_btn.click(fn=generate, inputs=[image, textbox, seed], outputs=[output_image])
|
| 101 |
|