tokeron commited on
Commit
86cf315
1 Parent(s): 89d7d51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -21,20 +21,11 @@ def get_prompt(prompt):
21
 
22
  def generate_images(prompt):
23
  print('calling diffusion lens')
24
- images = []
25
- for skip_layers in range(1): # loop from 0 to 23
26
- image = get_images(prompt, skip_layers=skip_layers)
27
- images.append(image)
28
-
29
- return images
30
 
31
 
32
 
33
  with gr.Blocks() as demo:
34
- # gallery = gr.Gallery(
35
- # label="Generated images", show_label=False, elem_id="gallery",
36
- # columns=[6], rows=[4], object_fit="contain", height="auto") # set rows to 24 to accommodate all images
37
- # btn = gr.Button("Generate images", scale=0)
38
- text_input = gr.Interface(fn=generate_images, inputs="text", outputs=["image"] * 1)
39
- # btn.click(generate_images, text_input, gallery) # pass the text input interface to btn.click()
40
  demo.launch()
 
21
 
22
  def generate_images(prompt):
23
  print('calling diffusion lens')
24
+ image = get_images(prompt, skip_layers=skip_layers)
25
+ return image
 
 
 
 
26
 
27
 
28
 
29
  with gr.Blocks() as demo:
30
+ text_input = gr.Interface(fn=generate_images, inputs="text", outputs="image")
 
 
 
 
 
31
  demo.launch()