Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -216,9 +216,48 @@ async () => {
|
|
216 |
"""
|
217 |
|
218 |
with gr.Blocks(css="style.css") as demo:
|
219 |
-
gr.Markdown("# pix2pix-Turbo: **Sketch**", elem_id="description")
|
220 |
-
gr.Markdown("**Paper:** [One-Step Image Translation with Text-to-Image Models](https://arxiv.org/abs/2403.12036) ", elem_id="paper_name")
|
221 |
-
gr.Markdown("**GitHub:** https://github.com/GaParmar/img2img-turbo", elem_id="github")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
# these are hidden buttons that are used to trigger the canvas changes
|
223 |
line = gr.Checkbox(label="line", value=False, elem_id="cb-line")
|
224 |
eraser = gr.Checkbox(label="eraser", value=False, elem_id="cb-eraser")
|
@@ -247,11 +286,12 @@ with gr.Blocks(css="style.css") as demo:
|
|
247 |
prompt_temp = gr.Textbox(label="Prompt Style Template", value=styles[DEFAULT_STYLE_NAME], scale=2, max_lines=1)
|
248 |
|
249 |
with gr.Row():
|
250 |
-
val_r = gr.Slider(label="Sketch guidance
|
251 |
seed = gr.Textbox(label="Seed", value=42, scale=1, min_width=50)
|
252 |
randomize_seed = gr.Button("Random", scale=1, min_width=50)
|
253 |
|
254 |
with gr.Column(elem_id="column_process", min_width=50, scale=0.2):
|
|
|
255 |
run_button = gr.Button("Run", min_width=50)
|
256 |
|
257 |
with gr.Column(elem_id="column_output"):
|
|
|
216 |
"""
|
217 |
|
218 |
with gr.Blocks(css="style.css") as demo:
|
219 |
+
#gr.Markdown("# pix2pix-Turbo: **Sketch**", elem_id="description")
|
220 |
+
#gr.Markdown("**Paper:** [One-Step Image Translation with Text-to-Image Models](https://arxiv.org/abs/2403.12036) ", elem_id="paper_name")
|
221 |
+
#gr.Markdown("**GitHub:** https://github.com/GaParmar/img2img-turbo", elem_id="github")
|
222 |
+
gr.HTML(
|
223 |
+
"""
|
224 |
+
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
225 |
+
<div>
|
226 |
+
<h2><a href="https://github.com/GaParmar/img2img-turbo">One-Step Image Translation with Text-to-Image Models</a></h2>
|
227 |
+
<div>
|
228 |
+
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
229 |
+
<a href='https://gauravparmar.com/'>Gaurav Parmar, </a>
|
230 |
+
|
231 |
+
<a href='https://taesung.me/'> Taesung Park,</a>
|
232 |
+
|
233 |
+
<a href='https://www.cs.cmu.edu/~srinivas/'>Srinivasa Narasimhan, </a>
|
234 |
+
|
235 |
+
<a href='https://www.cs.cmu.edu/~junyanz/'> Jun-Yan Zhu </a>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
</br>
|
239 |
+
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
240 |
+
<a href='https://arxiv.org/abs/2403.12036'>
|
241 |
+
<img src="https://img.shields.io/badge/arXiv-2403.12036-red">
|
242 |
+
</a>
|
243 |
+
|
244 |
+
<a href='https://github.com/GaParmar/img2img-turbo'>
|
245 |
+
<img src='https://img.shields.io/badge/github-%23121011.svg'>
|
246 |
+
</a>
|
247 |
+
|
248 |
+
<a href='https://github.com/GaParmar/img2img-turbo/blob/main/LICENSE'>
|
249 |
+
<img src='https://img.shields.io/badge/license-MIT-lightgrey'>
|
250 |
+
</a>
|
251 |
+
</div>
|
252 |
+
</div>
|
253 |
+
</div>
|
254 |
+
<div>
|
255 |
+
</br>
|
256 |
+
</div>
|
257 |
+
"""
|
258 |
+
)
|
259 |
+
|
260 |
+
|
261 |
# these are hidden buttons that are used to trigger the canvas changes
|
262 |
line = gr.Checkbox(label="line", value=False, elem_id="cb-line")
|
263 |
eraser = gr.Checkbox(label="eraser", value=False, elem_id="cb-eraser")
|
|
|
286 |
prompt_temp = gr.Textbox(label="Prompt Style Template", value=styles[DEFAULT_STYLE_NAME], scale=2, max_lines=1)
|
287 |
|
288 |
with gr.Row():
|
289 |
+
val_r = gr.Slider(label="Sketch guidance: ", show_label=True, minimum=0, maximum=1, value=0.4, step=0.01, scale=3)
|
290 |
seed = gr.Textbox(label="Seed", value=42, scale=1, min_width=50)
|
291 |
randomize_seed = gr.Button("Random", scale=1, min_width=50)
|
292 |
|
293 |
with gr.Column(elem_id="column_process", min_width=50, scale=0.2):
|
294 |
+
gr.Markdown("## pix2pix-turbo", elem_id="description")
|
295 |
run_button = gr.Button("Run", min_width=50)
|
296 |
|
297 |
with gr.Column(elem_id="column_output"):
|