jamino30 commited on
Commit
e4e9abf
·
verified ·
1 Parent(s): f349f0e

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +15 -13
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.Accordion('Adjustments', open=True):
81
- with gr.Group():
82
- style_strength_slider = gr.Slider(label='Style Strength', minimum=1, maximum=100, step=1, value=50)
83
-
84
- with gr.Row():
85
- low_button = gr.Button('Low', size='sm').click(fn=lambda: set_slider(10), outputs=[style_strength_slider])
86
- medium_button = gr.Button('Medium', size='sm').click(fn=lambda: set_slider(50), outputs=[style_strength_slider])
87
- high_button = gr.Button('High', size='sm').click(fn=lambda: set_slider(100), outputs=[style_strength_slider])
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
- label='Example',
120
- examples=[['./content_images/Bridge.jpg', 'Starry Night', 100, False]],
121
- inputs=[content_and_output, style_dropdown, style_strength_slider, output_quality]
 
 
 
 
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