muhtasham commited on
Commit
08b33e5
1 Parent(s): 7e88973

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -62,7 +62,8 @@ with gr.Blocks() as demo:
62
  height = gr.inputs.Slider(label="Height", default=256, step=32, maximum = 256, minimum=32)
63
  images = gr.inputs.Slider(label="Images - How many images you wish to generate", default=1, step=1, minimum=1, maximum=4)
64
  diversity = gr.inputs.Slider(label="Diversity scale - How different from one another you wish the images to be",default=15.0, minimum=1.0, maximum=15.0)
65
- img = [gr.outputs.Image(type="pil"),gr.outputs.Textbox(label="Error")]
 
66
  with gr.Row():
67
  get_image_latent = gr.Button("Generate Image go brr")
68
  with gr.Column():
@@ -73,7 +74,7 @@ with gr.Blocks() as demo:
73
 
74
 
75
  speech_to_text.click(speech_to_text, inputs=audio_file, outputs=text)
76
- get_image_latent.click(text2image_latent, inputs=[text,steps,width,height,images,diversity], outputs=img)
77
  zero_shot_clf.click(zero_shot, inputs=[img[0],text_input], outputs=label)
78
 
79
  demo.launch(enable_queue=False)
 
62
  height = gr.inputs.Slider(label="Height", default=256, step=32, maximum = 256, minimum=32)
63
  images = gr.inputs.Slider(label="Images - How many images you wish to generate", default=1, step=1, minimum=1, maximum=4)
64
  diversity = gr.inputs.Slider(label="Diversity scale - How different from one another you wish the images to be",default=15.0, minimum=1.0, maximum=15.0)
65
+ #gallery = [gr.outputs.Image(type="pil"),gr.outputs.Textbox(label="Error")]
66
+ gallery = gr.Gallery(label="Individual images")
67
  with gr.Row():
68
  get_image_latent = gr.Button("Generate Image go brr")
69
  with gr.Column():
 
74
 
75
 
76
  speech_to_text.click(speech_to_text, inputs=audio_file, outputs=text)
77
+ get_image_latent.click(text2image_latent, inputs=[text,steps,width,height,images,diversity], outputs=gallery)
78
  zero_shot_clf.click(zero_shot, inputs=[img[0],text_input], outputs=label)
79
 
80
  demo.launch(enable_queue=False)