Shreyas094 commited on
Commit
6bf3bf2
·
verified ·
1 Parent(s): 79f12fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ llama_parser = LlamaParse(
26
  language="en",
27
  )
28
 
29
- def load_document(file: NamedTemporaryFile, parser: str = "pypdf") -> List[Document]:
30
  """Loads and splits the document into pages."""
31
  if parser == "pypdf":
32
  loader = PyPDFLoader(file.name)
@@ -192,7 +192,7 @@ with gr.Blocks() as demo:
192
 
193
  with gr.Row():
194
  file_input = gr.Files(label="Upload your PDF documents", file_types=[".pdf"])
195
- parser_dropdown = gr.Dropdown(choices=["pypdf", "llamaparse"], label="Select PDF Parser", value="pypdf")
196
  update_button = gr.Button("Upload Document")
197
 
198
  update_output = gr.Textbox(label="Update Status")
 
26
  language="en",
27
  )
28
 
29
+ def load_document(file: NamedTemporaryFile, parser: str = "llamaparse") -> List[Document]:
30
  """Loads and splits the document into pages."""
31
  if parser == "pypdf":
32
  loader = PyPDFLoader(file.name)
 
192
 
193
  with gr.Row():
194
  file_input = gr.Files(label="Upload your PDF documents", file_types=[".pdf"])
195
+ parser_dropdown = gr.Dropdown(choices=["pypdf", "llamaparse"], label="Select PDF Parser", value="llamaparse")
196
  update_button = gr.Button("Upload Document")
197
 
198
  update_output = gr.Textbox(label="Update Status")