Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -77,16 +77,14 @@ with gr.Blocks(css=css) as demo:
|
|
77 |
content_and_output = gr.Image(label='Content', show_label=False, type='pil', sources=['upload', 'webcam', 'clipboard'], format='jpg', show_download_button=False)
|
78 |
style_dropdown = gr.Radio(choices=list(style_options.keys()), label='Style', value='Starry Night', type='value')
|
79 |
|
80 |
-
with gr.
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
with gr.Group():
|
89 |
-
output_quality = gr.Checkbox(label='More Realistic', info='Note: If unchecked, the resulting image will have a more artistic flair.')
|
90 |
|
91 |
submit_button = gr.Button('Submit', variant='primary')
|
92 |
download_button = gr.DownloadButton(label='Download Image', visible=False)
|
@@ -116,9 +114,13 @@ with gr.Blocks(css=css) as demo:
|
|
116 |
)
|
117 |
|
118 |
examples = gr.Examples(
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
122 |
)
|
123 |
|
124 |
demo.queue = False
|
|
|
77 |
content_and_output = gr.Image(label='Content', show_label=False, type='pil', sources=['upload', 'webcam', 'clipboard'], format='jpg', show_download_button=False)
|
78 |
style_dropdown = gr.Radio(choices=list(style_options.keys()), label='Style', value='Starry Night', type='value')
|
79 |
|
80 |
+
with gr.Group():
|
81 |
+
style_strength_slider = gr.Slider(label='Style Strength', minimum=1, maximum=100, step=1, value=100)
|
82 |
+
with gr.Row():
|
83 |
+
low_button = gr.Button('Low', size='sm').click(fn=lambda: set_slider(10), outputs=[style_strength_slider])
|
84 |
+
medium_button = gr.Button('Medium', size='sm').click(fn=lambda: set_slider(50), outputs=[style_strength_slider])
|
85 |
+
high_button = gr.Button('High', size='sm').click(fn=lambda: set_slider(100), outputs=[style_strength_slider])
|
86 |
+
|
87 |
+
output_quality = gr.Checkbox(label='More Realistic', info='Note: If unchecked, the resulting image will have a more artistic flair.')
|
|
|
|
|
88 |
|
89 |
submit_button = gr.Button('Submit', variant='primary')
|
90 |
download_button = gr.DownloadButton(label='Download Image', visible=False)
|
|
|
114 |
)
|
115 |
|
116 |
examples = gr.Examples(
|
117 |
+
examples=[
|
118 |
+
['./content_images/Bridge.jpg', 'Starry Night'],
|
119 |
+
['./content_images/NYCSkyline.jpg', 'Mosaic'],
|
120 |
+
['./content_images/GoldenRetriever.jpg', 'Great Wave'],
|
121 |
+
['./content_images/CameraGirl.jpg', 'Bokeh']
|
122 |
+
],
|
123 |
+
inputs=[content_and_output, style_dropdown]
|
124 |
)
|
125 |
|
126 |
demo.queue = False
|