ysharma HF Staff commited on
Commit
5e453e6
·
1 Parent(s): e66e8aa

update theme and layout

Browse files
Files changed (1) hide show
  1. app.py +14 -8
app.py CHANGED
@@ -52,20 +52,26 @@ def get_upscale_op(prompt, gallery_if):
52
  #upscaled_image.save("upsampled.png")
53
  return upscaled_image
54
 
55
- with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
 
 
 
 
56
  with gr.Row():
57
  with gr.Column(scale=4):
58
  prompt = gr.Textbox(label='Prompt')
59
  neg_prompt = gr.Textbox(label='Negative Prompt')
60
  with gr.Column(scale=1):
61
- b1 = gr.Button('Generate').style(full_width=True)
62
- gallery_if = gr.Gallery(label='IF Space outputs', ).style(columns=4, object_fit="contain", preview=True)
63
- b2 = gr.Button("Get the best generation using Pick-A-Pic")
64
- image_picakapic = gr.Image(label="PickAPic Evaluated Output")
65
-
 
 
66
  b1.click(get_IF_op,[prompt, neg_prompt], gallery_if)
67
  prompt.submit(get_IF_op,[prompt, neg_prompt], gallery_if)
68
  b2.click(get_upscale_op,[prompt, gallery_if], image_picakapic)
69
 
70
-
71
- demo.launch()
 
52
  #upscaled_image.save("upsampled.png")
53
  return upscaled_image
54
 
55
+ theme = gr.themes.Monochrome(
56
+ neutral_hue="cyan",
57
+ radius_size="md",
58
+ spacing_size="sm",)
59
+ with gr.Blocks(theme=theme) as demo:
60
  with gr.Row():
61
  with gr.Column(scale=4):
62
  prompt = gr.Textbox(label='Prompt')
63
  neg_prompt = gr.Textbox(label='Negative Prompt')
64
  with gr.Column(scale=1):
65
+ b1 = gr.Button("Generate 'IF' Output").style(full_width=True)
66
+ with gr.Row():
67
+ with gr.Column():
68
+ gallery_if = gr.Gallery(label='IF Space outputs', ).style(columns=4, object_fit="contain", preview=True)
69
+ b2 = gr.Button("Get the best generation using Pick-A-Pic")
70
+ image_picakapic = gr.Image(label="PickAPic Evaluated Output")
71
+
72
  b1.click(get_IF_op,[prompt, neg_prompt], gallery_if)
73
  prompt.submit(get_IF_op,[prompt, neg_prompt], gallery_if)
74
  b2.click(get_upscale_op,[prompt, gallery_if], image_picakapic)
75
 
76
+ demo.queue(concurrency_count=2, max_size=10)
77
+ demo.launch(debug=True)