PierreBrunelle commited on
Commit
2663a60
·
verified ·
1 Parent(s): 303bf04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -63,9 +63,8 @@ def process_files(ground_truth_file, pdf_files):
63
  'rag_demo.documents',
64
  {'document': pxt.DocumentType()}
65
  )
66
-
67
- for pdf_file in pdf_files:
68
- documents_t.insert({'document': pdf_file.name})
69
 
70
  # Create chunks view
71
  chunks_t = pxt.create_view(
 
63
  'rag_demo.documents',
64
  {'document': pxt.DocumentType()}
65
  )
66
+
67
+ documents_t.insert({'document': file.name} for file in pdf_files if file.name.endswith('.pdf'))
 
68
 
69
  # Create chunks view
70
  chunks_t = pxt.create_view(