kpal002 commited on
Commit
c135f63
1 Parent(s): 940e0f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -170,12 +170,7 @@ def process_pdf(uploaded_files, llm_model, n_criteria = num_criteria):
170
  # Process the PDF file
171
  file_name_without_extension = os.path.splitext(os.path.basename(uploaded_file))[0]
172
 
173
- id_search = re.search(r"Id_(\d+)\.", file_name_without_extension)
174
- if id_search:
175
- id_number = id_search.group(1)
176
- else:
177
- print(f"ID not found in file name: {uploaded_file}")
178
- continue
179
 
180
  pdf_processor = PDFProcessor_Unstructured(pdf_processing_config)
181
  merged_chunks, tables, title = pdf_processor.process_pdf_file(uploaded_file)
 
170
  # Process the PDF file
171
  file_name_without_extension = os.path.splitext(os.path.basename(uploaded_file))[0]
172
 
173
+ id_number = file_name_without_extension.split('_')[1]
 
 
 
 
 
174
 
175
  pdf_processor = PDFProcessor_Unstructured(pdf_processing_config)
176
  merged_chunks, tables, title = pdf_processor.process_pdf_file(uploaded_file)