Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ for param in model.parameters():
|
|
24 |
style_files = os.listdir('./style_images')
|
25 |
style_options = {' '.join(style_file.split('.')[0].split('_')): f'./style_images/{style_file}' for style_file in style_files}
|
26 |
|
27 |
-
@spaces.GPU(duration=
|
28 |
def inference(content_image, style_image, style_strength, output_quality, progress=gr.Progress(track_tqdm=True)):
|
29 |
yield None
|
30 |
print('-'*15)
|
@@ -102,7 +102,7 @@ with gr.Blocks(css=css) as demo:
|
|
102 |
medium_button = gr.Button('Medium').click(fn=lambda: set_slider(50), outputs=[style_strength_slider])
|
103 |
high_button = gr.Button('High').click(fn=lambda: set_slider(100), outputs=[style_strength_slider])
|
104 |
with gr.Group():
|
105 |
-
output_quality = gr.Checkbox(label='More Realistic', info='Note:
|
106 |
submit_button = gr.Button('Submit')
|
107 |
|
108 |
submit_button.click(fn=inference, inputs=[content_and_output, style_dropdown, style_strength_slider, output_quality], outputs=[content_and_output])
|
|
|
24 |
style_files = os.listdir('./style_images')
|
25 |
style_options = {' '.join(style_file.split('.')[0].split('_')): f'./style_images/{style_file}' for style_file in style_files}
|
26 |
|
27 |
+
@spaces.GPU(duration=20)
|
28 |
def inference(content_image, style_image, style_strength, output_quality, progress=gr.Progress(track_tqdm=True)):
|
29 |
yield None
|
30 |
print('-'*15)
|
|
|
102 |
medium_button = gr.Button('Medium').click(fn=lambda: set_slider(50), outputs=[style_strength_slider])
|
103 |
high_button = gr.Button('High').click(fn=lambda: set_slider(100), outputs=[style_strength_slider])
|
104 |
with gr.Group():
|
105 |
+
output_quality = gr.Checkbox(label='More Realistic', info='Note: If unchecked, the resulting image will have a more artistic flair.', value=True)
|
106 |
submit_button = gr.Button('Submit')
|
107 |
|
108 |
submit_button.click(fn=inference, inputs=[content_and_output, style_dropdown, style_strength_slider, output_quality], outputs=[content_and_output])
|