@app.post("/add-sources/") async def create_file(file: UploadFile): print(file.filename) loader = SimpleDirectoryReader("") print("Processing PDF files...") source_doc = loader.load_data(file=file) return {"file_size": file.filename}
document = Document(text=YOUR_FILE_TEXT)
loader = SimpleDirectoryReader(input_files=['file1_path','file2_path']).load_data()