Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -141,14 +141,12 @@ with gr.Blocks(title='🖼️ Neural Style Transfer') as demo:
|
|
141 |
content_image = gr.Image(label='Content', type='pil', sources=['upload'])
|
142 |
style_dropdown = gr.Dropdown(choices=list(style_options.keys()), label='Style', value='Starry Night', type='value')
|
143 |
with gr.Accordion('Advanced Settings', open=False):
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
medium_button.click(fn=lambda: set_slider(50), outputs=[style_strength_slider])
|
151 |
-
high_button.click(fn=lambda: set_slider(100), outputs=[style_strength_slider])
|
152 |
submit_button = gr.Button('Submit')
|
153 |
with gr.Column():
|
154 |
output_image = gr.Image(label='Output', show_download_button=True, interactive=False)
|
|
|
141 |
content_image = gr.Image(label='Content', type='pil', sources=['upload'])
|
142 |
style_dropdown = gr.Dropdown(choices=list(style_options.keys()), label='Style', value='Starry Night', type='value')
|
143 |
with gr.Accordion('Advanced Settings', open=False):
|
144 |
+
with gr.Group():
|
145 |
+
style_strength_slider = gr.Slider(label='Style Strength', minimum=0, maximum=100, step=5, value=50)
|
146 |
+
with gr.Row():
|
147 |
+
low_button = gr.Button('Low').click(fn=lambda: set_slider(10), outputs=[style_strength_slider])
|
148 |
+
medium_button = gr.Button('Medium').click(fn=lambda: set_slider(50), outputs=[style_strength_slider])
|
149 |
+
high_button = gr.Button('High').click(fn=lambda: set_slider(100), outputs=[style_strength_slider])
|
|
|
|
|
150 |
submit_button = gr.Button('Submit')
|
151 |
with gr.Column():
|
152 |
output_image = gr.Image(label='Output', show_download_button=True, interactive=False)
|