zhiqiulin commited on
Commit
aa1a306
·
verified ·
1 Parent(s): 62ed9c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -136,7 +136,7 @@ with gr.Blocks() as demo_vqascore_ranking:
136
  gr.Markdown("""
137
  # VQAScore Ranking
138
  This model ranks a gallery of images based on their similarity to a text prompt.
139
- **Please retry if the model fails to load for the first time. Once the model is loaded to GPUs, the ranking process will be extremely fast.**
140
  """)
141
 
142
  with gr.Row():
@@ -152,9 +152,8 @@ with gr.Blocks() as demo_vqascore_ranking:
152
  example1_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt0), inputs=[], outputs=[model_dropdown, gallery, prompt])
153
  example2_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt1), inputs=[], outputs=[model_dropdown, gallery, prompt])
154
 
155
- ranked_gallery = gr.Gallery(label="Ranked Images with Scores", elem_id="ranked-gallery", columns=4, allow_preview=True)
156
-
157
- rank_button.click(fn=rank_images, inputs=[model_dropdown, gallery, prompt], outputs=ranked_gallery)
158
 
159
  # # Create the second demo
160
  # with gr.Blocks() as demo_vqascore_ranking:
 
136
  gr.Markdown("""
137
  # VQAScore Ranking
138
  This model ranks a gallery of images based on their similarity to a text prompt.
139
+ Please retry if the model fails to load on GPU for the first time. Once the model is loaded onto the GPU, the ranking process should be fast.
140
  """)
141
 
142
  with gr.Row():
 
152
  example1_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt0), inputs=[], outputs=[model_dropdown, gallery, prompt])
153
  example2_button.click(fn=lambda: load_example("clip-flant5-xxl", example_imgs, example_prompt1), inputs=[], outputs=[model_dropdown, gallery, prompt])
154
 
155
+ ranked_gallery = gr.Gallery(label="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: