Spaces:
Sleeping
Sleeping
Siyun He
commited on
Commit
·
c721db7
1
Parent(s):
92a73ad
improve gradio interface
Browse files
app.py
CHANGED
@@ -313,6 +313,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="purple", secondary_hue="blue"))
|
|
313 |
gr.Markdown("<h1 style='text-align: center; font-weight: bold;'>🤓 Glasses Virtual Try-On 🕶️👓</h1>")
|
314 |
with gr.Column(elem_classes=["my-column"]):
|
315 |
with gr.Group(elem_classes=["my-group"]):
|
|
|
316 |
transform = gr.Dropdown(choices=["cartoon", "edges", "sepia", "negative", "sketch", "blur", "none"],
|
317 |
value="none", label="Select Filter")
|
318 |
lip_color = gr.Dropdown(choices=["classic_red", "deep_red", "cherry_red", "rose_red", "wine_red", "brick_red", "coral_red", "berry_red", "ruby_red", "crimson_red", "none"],
|
@@ -324,6 +325,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="purple", secondary_hue="blue"))
|
|
324 |
glass_shape_output = gr.Textbox(label="Recommended Glass Shape")
|
325 |
next_button = gr.Button("Next Glasses➡️")
|
326 |
save_button = gr.Button("Save as a Picture📌")
|
|
|
327 |
download_link = gr.File(label="Download Saved Picture")
|
328 |
input_img.stream(webcam_input, [input_img, transform, lip_color], [input_img, face_shape_output, glass_shape_output], stream_every=0.1)
|
329 |
with gr.Row():
|
|
|
313 |
gr.Markdown("<h1 style='text-align: center; font-weight: bold;'>🤓 Glasses Virtual Try-On 🕶️👓</h1>")
|
314 |
with gr.Column(elem_classes=["my-column"]):
|
315 |
with gr.Group(elem_classes=["my-group"]):
|
316 |
+
gr.Markdown("You can only apply one filter at a time, either the transform filter or the lip color filter.")
|
317 |
transform = gr.Dropdown(choices=["cartoon", "edges", "sepia", "negative", "sketch", "blur", "none"],
|
318 |
value="none", label="Select Filter")
|
319 |
lip_color = gr.Dropdown(choices=["classic_red", "deep_red", "cherry_red", "rose_red", "wine_red", "brick_red", "coral_red", "berry_red", "ruby_red", "crimson_red", "none"],
|
|
|
325 |
glass_shape_output = gr.Textbox(label="Recommended Glass Shape")
|
326 |
next_button = gr.Button("Next Glasses➡️")
|
327 |
save_button = gr.Button("Save as a Picture📌")
|
328 |
+
gr.Markdown("‼️Warning: Refresh the page after saving the picture to use the virtual try-on again.")
|
329 |
download_link = gr.File(label="Download Saved Picture")
|
330 |
input_img.stream(webcam_input, [input_img, transform, lip_color], [input_img, face_shape_output, glass_shape_output], stream_every=0.1)
|
331 |
with gr.Row():
|