muhtasham commited on
Commit
20d818e
1 Parent(s): ac022fd

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=4, 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.Gallery(label="Individual images", show_label=True)
 
66
  with gr.Row():
67
  get_image_latent = gr.Button("Generate Image go brr", css={"margin-top": "1em"})
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=gallery)
77
  zero_shot_clf.click(zero_shot, inputs=[gallery[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=4, 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
+ image = gr.outputs.Image(type="pil", label="Your result")
66
+ img = [image,gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")]
67
  with gr.Row():
68
  get_image_latent = gr.Button("Generate Image go brr", css={"margin-top": "1em"})
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=img)
78
  zero_shot_clf.click(zero_shot, inputs=[gallery[0],text_input], outputs = label)
79
 
80
  demo.launch(enable_queue=False)