zhiqiulin commited on
Commit
d601aed
1 Parent(s): 77ce130

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -147,13 +147,16 @@ with gr.Blocks() as demo_vqascore_ranking:
147
  rank_button = gr.Button("Submit")
148
 
149
  with gr.Column():
150
- example1_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt0), inputs=[], outputs=[model_dropdown, gallery, prompt])
151
- example2_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt1), inputs=[], outputs=[model_dropdown, gallery, prompt])
 
 
 
152
  example1_button = gr.Button("Load Example 1")
153
  example2_button = gr.Button("Load Example 2")
 
 
154
 
155
- ranked_gallery = gr.Gallery(label="Output: Ranked Images with Scores", elem_id="ranked-gallery", columns=4, allow_preview=True)
156
- rank_button.click(fn=rank_images, inputs=[model_dropdown, gallery, prompt], outputs=ranked_gallery)
157
 
158
  # # Create the second demo
159
  # with gr.Blocks() as demo_vqascore_ranking:
 
147
  rank_button = gr.Button("Submit")
148
 
149
  with gr.Column():
150
+
151
+ ranked_gallery = gr.Gallery(label="Output: Ranked Images with Scores", elem_id="ranked-gallery", columns=4, allow_preview=True)
152
+ rank_button.click(fn=rank_images, inputs=[model_dropdown, gallery, prompt], outputs=ranked_gallery)
153
+
154
+
155
  example1_button = gr.Button("Load Example 1")
156
  example2_button = gr.Button("Load Example 2")
157
+ example1_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt0), inputs=[], outputs=[model_dropdown, gallery, prompt])
158
+ example2_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt1), inputs=[], outputs=[model_dropdown, gallery, prompt])
159
 
 
 
160
 
161
  # # Create the second demo
162
  # with gr.Blocks() as demo_vqascore_ranking: