bonfimr commited on
Commit
44ad7c2
1 Parent(s): ac3c86a

Upload 5 files

Browse files
Notebooks/Gerador_de_base_sintética.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
Notebooks/LoRA_QLoRA.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
Notebooks/processamento_pdfs.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
Notebooks/rag.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
Notebooks/script_documentos.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ def concatenate_files(directory_path, output_file):
4
+ """
5
+ Concatenates all files in the specified directory into a single output file.
6
+ :param directory_path: Path to the directory containing the files.
7
+ :param output_file: Path to the output file where the concatenated content will be saved.
8
+ """
9
+ with open(output_file, 'w', encoding='utf-8') as outfile:
10
+ for filename in os.listdir(directory_path):
11
+ file_path = os.path.join(directory_path, filename)
12
+ if os.path.isfile(file_path):
13
+ with open(file_path, 'r', encoding='utf-8') as infile:
14
+ content = infile.read()
15
+ outfile.write(content)
16
+ outfile.write('\n') # Add a newline separator between files
17
+
18
+ if __name__ == '__main__':
19
+ input_directory = '.' # Replace with the actual directory path
20
+ output_filename = 'combined_output.txt' # Specify the desired output file name
21
+
22
+ concatenate_files(input_directory, output_filename)
23
+ print(f"Concatenated files from '{input_directory}' into '{output_filename}'.")