RageshAntony commited on
Commit
d45e86a
·
verified ·
1 Parent(s): 3ddc74e
Files changed (1) hide show
  1. check_app.py +18 -20
check_app.py CHANGED
@@ -21,19 +21,8 @@ import os
21
  from datetime import datetime
22
  MAX_SEED = np.iinfo(np.int32).max
23
  MAX_IMAGE_SIZE = 1024
24
- gallery : gr.Gallery = None
25
-
26
- def initialize_components():
27
- global gallery
28
 
29
- gallery = gr.Gallery(
30
- label="Image Gallery",
31
- show_label=True,
32
- columns=4,
33
- rows=3,
34
- height=600,
35
- object_fit="contain"
36
- )
37
 
38
  class ProgressPipeline(DiffusionPipeline):
39
  def __init__(self, original_pipeline):
@@ -274,15 +263,24 @@ def main():
274
  output = gr.Textbox(label="Status")
275
  img = gr.Image(label=model_name, height=300)
276
 
277
- button.click(fn=create_pipeline_logic, inputs=[prompt_text, gr.Text(value= model_name,visible=False), negative_prompt,
278
- seed,
279
- randomize_seed,
280
- width,
281
- height,
282
- guidance_scale,
283
- num_inference_steps], outputs=[output, img, gallery])
284
 
285
- gallery.render()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
 
287
 
288
 
 
21
  from datetime import datetime
22
  MAX_SEED = np.iinfo(np.int32).max
23
  MAX_IMAGE_SIZE = 1024
 
 
 
 
24
 
25
+
 
 
 
 
 
 
 
26
 
27
  class ProgressPipeline(DiffusionPipeline):
28
  def __init__(self, original_pipeline):
 
263
  output = gr.Textbox(label="Status")
264
  img = gr.Image(label=model_name, height=300)
265
 
 
 
 
 
 
 
 
266
 
267
+
268
+ gallery = gr.Gallery(
269
+ label="Image Gallery",
270
+ show_label=True,
271
+ columns=4,
272
+ rows=3,
273
+ height=600,
274
+ object_fit="contain"
275
+ )
276
+
277
+ button.click(fn=create_pipeline_logic, inputs=[prompt_text, gr.Text(value= model_name,visible=False), negative_prompt,
278
+ seed,
279
+ randomize_seed,
280
+ width,
281
+ height,
282
+ guidance_scale,
283
+ num_inference_steps], outputs=[output, img, gallery])
284
 
285
 
286