tcy6 commited on
Commit
558ab5b
1 Parent(s): 029aeaf

Update app.py

Browse files
Files changed (2) hide show
  1. app.py +10 -3
  2. main_figure.pdf +0 -0
app.py CHANGED
@@ -19,8 +19,6 @@ import json
19
  cache_dir = '/data/KB'
20
  os.makedirs(cache_dir, exist_ok=True)
21
 
22
-
23
-
24
  @spaces.GPU
25
  def weighted_mean_pooling(hidden, attention_mask):
26
  attention_mask_ = attention_mask * attention_mask.cumsum(dim=1)
@@ -274,7 +272,16 @@ with gr.Blocks() as app:
274
  query_input = gr.Text(label="Your Queston")
275
  topk_input = inputs=gr.Number(value=5, minimum=1, maximum=10, step=1, label="Number of pages to retrieve")
276
  retrieve_button = gr.Button("Step2: Retrieve Pages")
277
-
 
 
 
 
 
 
 
 
 
278
  with gr.Row():
279
  images_output = gr.Gallery(label="Retrieved Pages")
280
 
 
19
  cache_dir = '/data/KB'
20
  os.makedirs(cache_dir, exist_ok=True)
21
 
 
 
22
  @spaces.GPU
23
  def weighted_mean_pooling(hidden, attention_mask):
24
  attention_mask_ = attention_mask * attention_mask.cumsum(dim=1)
 
272
  query_input = gr.Text(label="Your Queston")
273
  topk_input = inputs=gr.Number(value=5, minimum=1, maximum=10, step=1, label="Number of pages to retrieve")
274
  retrieve_button = gr.Button("Step2: Retrieve Pages")
275
+
276
+ with gr.Row():
277
+ gr.Examples(
278
+ examples=[
279
+ ["main_figure.pdf", "What is RAG-V?"],
280
+ ["main_figure.pdf", "How does RAG-V perform?"]
281
+ ],
282
+ inputs=[file_input, query_input],
283
+ )
284
+
285
  with gr.Row():
286
  images_output = gr.Gallery(label="Retrieved Pages")
287
 
main_figure.pdf ADDED
Binary file (384 kB). View file