FilipeR commited on
Commit
e34ce73
·
verified ·
1 Parent(s): 583cfc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -72,6 +72,7 @@ def infer(
72
 
73
  if height==256 and width==256:
74
  height, width = None, None
 
75
  print(f"Calling pipeline with prompt: '{prompt}'")
76
  print(f"Negative Prompt: '{negative_prompt}'")
77
  print(f"Seed: {seed}, Steps: {num_inference_steps}, Guidance: {true_guidance_scale}, Size: {width}x{height}")
@@ -109,10 +110,10 @@ def get_image_base64(image_path):
109
 
110
  logo_base64 = get_image_base64("logo.png")
111
 
112
- with gr.Blocks(css=css) as demo:
113
- with gr.Column(elem_id="col-container"):
114
- gr.HTML(f'<img src="data:image/png;base64,{logo_base64}" alt="FireRedTeam Logo" width="400" />')
115
- gr.Markdown("[Learn more](https://github.com/FireRedTeam/FireRed-Image-Edit) about the FireRed-Image-Edit series.")
116
  with gr.Row():
117
  with gr.Column():
118
  input_images = gr.Gallery(label="Input Images", show_label=False, type="pil", interactive=True)
@@ -128,7 +129,7 @@ with gr.Blocks(css=css) as demo:
128
  )
129
  run_button = gr.Button("Edit", variant="primary")
130
 
131
- with gr.Accordion("Advanced Settings", open=False):
132
  # Negative prompt UI element is removed here
133
 
134
  seed = gr.Slider(
@@ -199,4 +200,4 @@ with gr.Blocks(css=css) as demo:
199
 
200
  if __name__ == "__main__":
201
  # demo.launch()
202
- demo.launch(concurrency_limit=2)
 
72
 
73
  if height==256 and width==256:
74
  height, width = None, None
75
+
76
  print(f"Calling pipeline with prompt: '{prompt}'")
77
  print(f"Negative Prompt: '{negative_prompt}'")
78
  print(f"Seed: {seed}, Steps: {num_inference_steps}, Guidance: {true_guidance_scale}, Size: {width}x{height}")
 
110
 
111
  logo_base64 = get_image_base64("logo.png")
112
 
113
+ with gr.Blocks() as demo:
114
+ with gr.Column():
115
+ # gr.HTML(f'<img src="data:image/png;base64,{logo_base64}" alt="FireRedTeam Logo" width="400" />')
116
+ # gr.Markdown("[Learn more](https://github.com/FireRedTeam/FireRed-Image-Edit) about the FireRed-Image-Edit series.")
117
  with gr.Row():
118
  with gr.Column():
119
  input_images = gr.Gallery(label="Input Images", show_label=False, type="pil", interactive=True)
 
129
  )
130
  run_button = gr.Button("Edit", variant="primary")
131
 
132
+ with gr.Accordion("Advanced Settings", open=True):
133
  # Negative prompt UI element is removed here
134
 
135
  seed = gr.Slider(
 
200
 
201
  if __name__ == "__main__":
202
  # demo.launch()
203
+ demo.launch()