ahmed-masry commited on
Commit
8ee10ab
β€’
1 Parent(s): 21cc2de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -101,16 +101,15 @@ def get_example():
101
  return [[["climate_youth_magazine.pdf"], "How much tropical forest is cut annually ?"]]
102
 
103
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
104
- gr.Markdown("# ColPali: Efficient Document Retrieval with Vision Language Models πŸ“š")
105
- gr.Markdown("""Demo to test ColPali on PDF documents. The inference code is based on the [ViDoRe benchmark](https://github.com/illuin-tech/vidore-benchmark).
106
 
107
- ColPali is model implemented from the [ColPali paper](https://arxiv.org/abs/2407.01449).
108
 
109
  This demo allows you to upload PDF files and search for the most relevant pages based on your query.
110
  Refresh the page if you change documents !
111
 
112
- ⚠️ This demo uses a model trained exclusively on A4 PDFs in portrait mode, containing english text. Performance is expected to drop for other page formats and languages.
113
- Other models will be released with better robustness towards different languages and document formats !
114
  """)
115
  with gr.Row():
116
  with gr.Column(scale=2):
@@ -127,12 +126,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
127
  query = gr.Textbox(placeholder="Enter your query here", label="Query")
128
  k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=5)
129
 
130
- # with gr.Row():
131
- # gr.Examples(
132
- # examples=get_example(),
133
- # inputs=[file, query],
134
- # )
135
-
136
  # Define the actions
137
  search_button = gr.Button("πŸ” Search", variant="primary")
138
  output_gallery = gr.Gallery(label="Retrieved Documents", height=600, show_label=True)
 
101
  return [[["climate_youth_magazine.pdf"], "How much tropical forest is cut annually ?"]]
102
 
103
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
104
+ gr.Markdown("# ColFlor: Towards BERT-Size Vision-Language Document Retrieval Models")
105
+ gr.Markdown("""Demo to test ColFlor on PDF documents. This space is adapted from [ColPali Demo Space](https://huggingface.co/spaces/manu/ColPali-demo)
106
 
107
+ For more details about ColFlor, please refer to our blogpost (https://huggingface.co/blog/ahmed-masry/colflor).
108
 
109
  This demo allows you to upload PDF files and search for the most relevant pages based on your query.
110
  Refresh the page if you change documents !
111
 
112
+ ⚠️ This model performs best on English documents, and does not generalize well to other languages.
 
113
  """)
114
  with gr.Row():
115
  with gr.Column(scale=2):
 
126
  query = gr.Textbox(placeholder="Enter your query here", label="Query")
127
  k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=5)
128
 
 
 
 
 
 
 
129
  # Define the actions
130
  search_button = gr.Button("πŸ” Search", variant="primary")
131
  output_gallery = gr.Gallery(label="Retrieved Documents", height=600, show_label=True)