Spaces:
Running
Running
feat: change the layout the web
Browse files- app.py +17 -17
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -35,7 +35,7 @@ body {
|
|
| 35 |
border-radius: 20px;
|
| 36 |
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
| 37 |
padding: 24px;
|
| 38 |
-
backdrop-filter: blur(
|
| 39 |
}
|
| 40 |
.gradio-container {
|
| 41 |
background-image: url('https://lh3.googleusercontent.com/d/1y7H4WIjnBAcNvvi-3qOV_ORE-jMXP4fr');
|
|
@@ -81,7 +81,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 81 |
Human Faces Generation with Diffusion Models.
|
| 82 |
</p>
|
| 83 |
<p style="font-size: 15px;">
|
| 84 |
-
|
| 85 |
|
|
| 86 |
π» <a href="https://github.com/frankcholula/faice" target="_blank">Code</a>
|
| 87 |
</p>
|
|
@@ -89,9 +89,9 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 89 |
""")
|
| 90 |
|
| 91 |
gr.Markdown("---")
|
| 92 |
-
gr.Markdown("## Part 1. Unconditional Face Generation")
|
| 93 |
with gr.Row():
|
| 94 |
-
|
|
|
|
| 95 |
|
| 96 |
result_1 = gr.Image(label="Result", show_label=False)
|
| 97 |
|
|
@@ -109,25 +109,25 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 109 |
with gr.Row():
|
| 110 |
num_inference_steps_1 = gr.Slider(
|
| 111 |
label="Number of inference steps",
|
| 112 |
-
minimum=
|
| 113 |
-
maximum=
|
| 114 |
step=1,
|
| 115 |
-
value=
|
| 116 |
)
|
| 117 |
|
| 118 |
# gr.Examples(examples=[], inputs=[seed_1], outputs=[result_1, seed_1], fn=inference_unconditional,
|
| 119 |
# cache_examples=True, cache_mode="lazy")
|
| 120 |
|
| 121 |
gr.Markdown("---")
|
| 122 |
-
gr.Markdown("## Part 2. Class Guidance Face Generation")
|
| 123 |
with gr.Row():
|
| 124 |
-
|
| 125 |
-
label="Select Gender",
|
| 126 |
-
choices=GENDER_CHOICES,
|
| 127 |
-
value=GENDER_CHOICES[0]
|
| 128 |
-
)
|
| 129 |
run_button_2 = gr.Button("Run", scale=0, variant="primary")
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
result_2 = gr.Image(label="Result", show_label=False)
|
| 132 |
|
| 133 |
with gr.Accordion("Advanced Settings", open=False):
|
|
@@ -144,10 +144,10 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 144 |
with gr.Row():
|
| 145 |
num_inference_steps_2 = gr.Slider(
|
| 146 |
label="Number of inference steps",
|
| 147 |
-
minimum=
|
| 148 |
-
maximum=
|
| 149 |
step=1,
|
| 150 |
-
value=
|
| 151 |
)
|
| 152 |
|
| 153 |
# gr.Examples(examples=[], inputs=[gender_select_radio], outputs=[result_2, seed_2],
|
|
@@ -262,4 +262,4 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 262 |
if __name__ == "__main__":
|
| 263 |
with timer("All tasks"):
|
| 264 |
# demo.launch(mcp_server=True)
|
| 265 |
-
demo.launch(share=True, allowed_paths=["./"])
|
|
|
|
| 35 |
border-radius: 20px;
|
| 36 |
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
| 37 |
padding: 24px;
|
| 38 |
+
backdrop-filter: blur(20px);
|
| 39 |
}
|
| 40 |
.gradio-container {
|
| 41 |
background-image: url('https://lh3.googleusercontent.com/d/1y7H4WIjnBAcNvvi-3qOV_ORE-jMXP4fr');
|
|
|
|
| 81 |
Human Faces Generation with Diffusion Models.
|
| 82 |
</p>
|
| 83 |
<p style="font-size: 15px;">
|
| 84 |
+
π <a href="https://github.com/frankcholula/faice/blob/main/paper/human_faces_generation_with_diffusion_models.pdf" target="_blank">Report</a>
|
| 85 |
|
|
| 86 |
π» <a href="https://github.com/frankcholula/faice" target="_blank">Code</a>
|
| 87 |
</p>
|
|
|
|
| 89 |
""")
|
| 90 |
|
| 91 |
gr.Markdown("---")
|
|
|
|
| 92 |
with gr.Row():
|
| 93 |
+
gr.Markdown("## Part 1. Unconditional Face Generation")
|
| 94 |
+
run_button_1 = gr.Button("Run", scale=0, variant="primary", elem_classes="gr-button-primary")
|
| 95 |
|
| 96 |
result_1 = gr.Image(label="Result", show_label=False)
|
| 97 |
|
|
|
|
| 109 |
with gr.Row():
|
| 110 |
num_inference_steps_1 = gr.Slider(
|
| 111 |
label="Number of inference steps",
|
| 112 |
+
minimum=20,
|
| 113 |
+
maximum=1000,
|
| 114 |
step=1,
|
| 115 |
+
value=100,
|
| 116 |
)
|
| 117 |
|
| 118 |
# gr.Examples(examples=[], inputs=[seed_1], outputs=[result_1, seed_1], fn=inference_unconditional,
|
| 119 |
# cache_examples=True, cache_mode="lazy")
|
| 120 |
|
| 121 |
gr.Markdown("---")
|
|
|
|
| 122 |
with gr.Row():
|
| 123 |
+
gr.Markdown("## Part 2. Class Guidance Face Generation")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
run_button_2 = gr.Button("Run", scale=0, variant="primary")
|
| 125 |
|
| 126 |
+
gender_select_radio = gr.Radio(
|
| 127 |
+
label="Select Gender",
|
| 128 |
+
choices=GENDER_CHOICES,
|
| 129 |
+
value=GENDER_CHOICES[0],
|
| 130 |
+
)
|
| 131 |
result_2 = gr.Image(label="Result", show_label=False)
|
| 132 |
|
| 133 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
|
| 144 |
with gr.Row():
|
| 145 |
num_inference_steps_2 = gr.Slider(
|
| 146 |
label="Number of inference steps",
|
| 147 |
+
minimum=20,
|
| 148 |
+
maximum=1000,
|
| 149 |
step=1,
|
| 150 |
+
value=100,
|
| 151 |
)
|
| 152 |
|
| 153 |
# gr.Examples(examples=[], inputs=[gender_select_radio], outputs=[result_2, seed_2],
|
|
|
|
| 262 |
if __name__ == "__main__":
|
| 263 |
with timer("All tasks"):
|
| 264 |
# demo.launch(mcp_server=True)
|
| 265 |
+
demo.launch(share=True, allowed_paths=["./"], ssr_mode=False)
|
requirements.txt
CHANGED
|
@@ -10,7 +10,7 @@ fastapi==0.115.12
|
|
| 10 |
ffmpy==0.5.0
|
| 11 |
filelock==3.18.0
|
| 12 |
fsspec==2025.5.1
|
| 13 |
-
gradio==5.
|
| 14 |
gradio_client==1.10.1
|
| 15 |
groovy==0.1.2
|
| 16 |
h11==0.16.0
|
|
|
|
| 10 |
ffmpy==0.5.0
|
| 11 |
filelock==3.18.0
|
| 12 |
fsspec==2025.5.1
|
| 13 |
+
gradio==5.32.0
|
| 14 |
gradio_client==1.10.1
|
| 15 |
groovy==0.1.2
|
| 16 |
h11==0.16.0
|