AdrienB134 commited on
Commit
8fb0879
1 Parent(s): a39ac5a
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -197,15 +197,12 @@ def index_gpu(images, ds):
197
  print("done")
198
  return f"Uploaded and converted {len(images)} pages", ds, images
199
 
200
- @spaces.GPU
201
- def answer_gpu():
202
- return 0
203
 
204
  def get_example():
205
- return [[["climate_youth_magazine.pdf"], "How much tropical forest is cut annually ?"]]
206
 
207
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
208
- gr.Markdown("# ColPali: Efficient Document Retrieval with Vision Language Models 📚")
209
 
210
  with gr.Row():
211
  with gr.Column(scale=2):
@@ -223,11 +220,11 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
223
  query = gr.Textbox(placeholder="Enter your query here", label="Query")
224
  k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=5)
225
 
226
- # with gr.Row():
227
- # gr.Examples(
228
- # examples=get_example(),
229
- # inputs=[file, query],
230
- # )
231
 
232
  # Define the actions
233
  search_button = gr.Button("🔍 Search", variant="primary")
 
197
  print("done")
198
  return f"Uploaded and converted {len(images)} pages", ds, images
199
 
 
 
 
200
 
201
  def get_example():
202
+ return [[["RAPPORT_DEVELOPPEMENT_DURABLE_2019.pdf"], "Quels sont les axes de développement du service achats?"]]
203
 
204
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
205
+ gr.Markdown("# ColPali + Idefics3: Efficient Document Retrieval with Vision Language Models 📚")
206
 
207
  with gr.Row():
208
  with gr.Column(scale=2):
 
220
  query = gr.Textbox(placeholder="Enter your query here", label="Query")
221
  k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=5)
222
 
223
+ with gr.Row():
224
+ gr.Examples(
225
+ examples=get_example(),
226
+ inputs=[file, query],
227
+ )
228
 
229
  # Define the actions
230
  search_button = gr.Button("🔍 Search", variant="primary")