bokesyo commited on
Commit
86cb789
1 Parent(s): 9584a7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -52,7 +52,7 @@ def add_pdf_gradio(pdf_file_binary, progress=gr.Progress()):
52
  with open(os.path.join(this_cache_dir, f"src.pdf"), 'wb') as file:
53
  file.write(pdf_file_binary)
54
 
55
- dpi = 100
56
  doc = fitz.open("pdf", pdf_file_binary)
57
 
58
  reps_list = []
@@ -211,15 +211,15 @@ Our model is capable of:
211
  with gr.Row():
212
  kb_id_input = gr.Text(label="Your Knowledge Base ID (paste your Knowledge Base ID here:)")
213
  query_input = gr.Text(label="Your Queston")
214
- topk_input = inputs=gr.Number(value=3, minimum=1, maximum=5, step=1, label="Number of pages to retrieve")
215
- retrieve_button = gr.Button("Retrieve")
216
 
217
  with gr.Row():
218
  downvote_button = gr.Button("🤣Downvote")
219
  upvote_button = gr.Button("🤗Upvote")
220
 
221
  with gr.Row():
222
- images_output = gr.Gallery(label="Retrieved Pages")
223
 
224
  retrieve_button.click(retrieve_gradio, inputs=[kb_id_input, query_input, topk_input], outputs=images_output)
225
 
 
52
  with open(os.path.join(this_cache_dir, f"src.pdf"), 'wb') as file:
53
  file.write(pdf_file_binary)
54
 
55
+ dpi = 200
56
  doc = fitz.open("pdf", pdf_file_binary)
57
 
58
  reps_list = []
 
211
  with gr.Row():
212
  kb_id_input = gr.Text(label="Your Knowledge Base ID (paste your Knowledge Base ID here:)")
213
  query_input = gr.Text(label="Your Queston")
214
+ topk_input = inputs=gr.Number(value=5, minimum=1, maximum=10, step=1, label="Number of pages to retrieve")
215
+ retrieve_button = gr.Button("Step 1: Retrieve")
216
 
217
  with gr.Row():
218
  downvote_button = gr.Button("🤣Downvote")
219
  upvote_button = gr.Button("🤗Upvote")
220
 
221
  with gr.Row():
222
+ images_output = gr.Gallery(label="Step 2: Retrieved Pages")
223
 
224
  retrieve_button.click(retrieve_gradio, inputs=[kb_id_input, query_input, topk_input], outputs=images_output)
225