dembasowmr commited on
Commit
0f2507d
·
1 Parent(s): c5b8eb4

Fix: Move pdf_document_paths to global scope in compassia.py for import

Browse files
Files changed (1) hide show
  1. compassia.py +12 -2
compassia.py CHANGED
@@ -340,6 +340,16 @@ class DocumentRAG:
340
  print(error_message)
341
  return f"Error: Could not get an answer from the AI. Details: {error_message}"
342
 
 
 
 
 
 
 
 
 
 
 
343
  # --- Main execution logic ---
344
  if __name__ == "__main__":
345
  rag_system = DocumentRAG(
@@ -349,7 +359,7 @@ if __name__ == "__main__":
349
  chunk_size=700,
350
  overlap=100
351
  )
352
-
353
  pdf_document_paths = [
354
  "documents/heracles_tr.pdf",
355
  "documents/heracles_en.pdf",
@@ -357,7 +367,7 @@ if __name__ == "__main__":
357
  "documents/Ogrenci_Liderligi_Burs_Programi_Sozlesme_Metni_2024-2025.pdf",
358
  "documents/tmv-bursluluk-yonergesi.pdf"
359
  ]
360
-
361
  print("\n--- Indexing Documents ---")
362
  for pdf_path in pdf_document_paths:
363
  if os.path.exists(pdf_path):
 
340
  print(error_message)
341
  return f"Error: Could not get an answer from the AI. Details: {error_message}"
342
 
343
+ # --- Define PDF documents (MOVED TO GLOBAL SCOPE) ---
344
+ pdf_document_paths = [
345
+ "documents/heracles_tr.pdf",
346
+ "documents/heracles_en.pdf",
347
+ "documents/ogrenci_katki_payi_ogrenim_ucretleri.pdf",
348
+ "documents/Ogrenci_Liderligi_Burs_Programi_Sozlesme_Metni_2024-2025.pdf",
349
+ "documents/tmv-bursluluk-yonergesi.pdf"
350
+ ]
351
+
352
+
353
  # --- Main execution logic ---
354
  if __name__ == "__main__":
355
  rag_system = DocumentRAG(
 
359
  chunk_size=700,
360
  overlap=100
361
  )
362
+ """
363
  pdf_document_paths = [
364
  "documents/heracles_tr.pdf",
365
  "documents/heracles_en.pdf",
 
367
  "documents/Ogrenci_Liderligi_Burs_Programi_Sozlesme_Metni_2024-2025.pdf",
368
  "documents/tmv-bursluluk-yonergesi.pdf"
369
  ]
370
+ """
371
  print("\n--- Indexing Documents ---")
372
  for pdf_path in pdf_document_paths:
373
  if os.path.exists(pdf_path):