ngdwtrg commited on
Commit
a07893d
·
1 Parent(s): ee00031

change to not save to local data folder for vectordatabase

Browse files
Files changed (1) hide show
  1. utils/uploadFilePDFtoMD.py +7 -7
utils/uploadFilePDFtoMD.py CHANGED
@@ -132,13 +132,13 @@ def convert_pdf_to_md(pdf_path: str) -> str:
132
 
133
  # Save paper to file md
134
  # Extract the file name from the full file path
135
- file_name = Path(pdf_path).stem + ".pdf" # Use stem + .pdf to match original basename logic
136
- os.makedirs("../data", exist_ok=True)
137
-
138
- # Save the file in the 'data' folder with the extracted file name
139
- output_path = f"data/{file_name}.md"
140
- with open(output_path, "w", encoding="utf-8") as f:
141
- f.write(md)
142
  return md
143
 
144
  if __name__ == "__main__":
 
132
 
133
  # Save paper to file md
134
  # Extract the file name from the full file path
135
+ # file_name = Path(pdf_path).stem + ".pdf" # Use stem + .pdf to match original basename logic
136
+ # os.makedirs("../data", exist_ok=True)
137
+ #
138
+ # # Save the file in the 'data' folder with the extracted file name
139
+ # output_path = f"data/{file_name}.md"
140
+ # with open(output_path, "w", encoding="utf-8") as f:
141
+ # f.write(md)
142
  return md
143
 
144
  if __name__ == "__main__":