bupa1018 commited on
Commit
32c79e6
·
1 Parent(s): 47b886e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -196,11 +196,13 @@ def process_directory(directory, folder_paths, file_paths):
196
  if file_paths:
197
  files += [get_file(tmpsubdirpath, file_path) for file_path in file_paths]
198
 
199
-
200
  print(f"Total number of files: {len(files)}")
 
201
  for file_path in files:
202
-
203
  file_ext = os.path.splitext(file_path)[1]
 
204
  if os.path.getsize(file_path) == 0:
205
  print(f"Skipping an empty file: {file_path}")
206
  continue
@@ -208,8 +210,7 @@ def process_directory(directory, folder_paths, file_paths):
208
  with open(file_path, 'rb') as f:
209
  if file_ext in ['.rst', '.py']:
210
  text = f.read().decode('utf-8')
211
- continue
212
-
213
  all_texts.append(text)
214
  print("Filepaths brother:", file_path)
215
  relative_path = os.path.relpath(file_path, tmpsubdirpath)
 
196
  if file_paths:
197
  files += [get_file(tmpsubdirpath, file_path) for file_path in file_paths]
198
 
199
+
200
  print(f"Total number of files: {len(files)}")
201
+
202
  for file_path in files:
203
+ print("111111111:", file_path)
204
  file_ext = os.path.splitext(file_path)[1]
205
+ print("222222222:", file_ext)
206
  if os.path.getsize(file_path) == 0:
207
  print(f"Skipping an empty file: {file_path}")
208
  continue
 
210
  with open(file_path, 'rb') as f:
211
  if file_ext in ['.rst', '.py']:
212
  text = f.read().decode('utf-8')
213
+
 
214
  all_texts.append(text)
215
  print("Filepaths brother:", file_path)
216
  relative_path = os.path.relpath(file_path, tmpsubdirpath)