bupa1018 commited on
Commit
16560bb
·
1 Parent(s): 0bc0052

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -147,6 +147,7 @@ def process_directory(directory, partial_paths=None, file_paths=None):
147
 
148
  print(f"Total number of files: {len(files)}")
149
  for file_path in files:
 
150
  file_ext = os.path.splitext(file_path)[1]
151
 
152
  if os.path.getsize(file_path) == 0:
@@ -156,7 +157,7 @@ def process_directory(directory, partial_paths=None, file_paths=None):
156
  with open(file_path, 'rb') as f:
157
  if file_ext in ['.rst', '.md', '.txt', '.html', '.json', '.yaml', '.py']:
158
  text = f.read().decode('utf-8')
159
- #print(f"Extracted text from {file_path}:\n{text[:200]}...\n")
160
  elif file_ext in ['.svg']:
161
  text = f"SVG file content from {file_path}"
162
  elif file_ext in ['.png', '.ico']:
 
147
 
148
  print(f"Total number of files: {len(files)}")
149
  for file_path in files:
150
+ print(f"Paths of files: {files}")
151
  file_ext = os.path.splitext(file_path)[1]
152
 
153
  if os.path.getsize(file_path) == 0:
 
157
  with open(file_path, 'rb') as f:
158
  if file_ext in ['.rst', '.md', '.txt', '.html', '.json', '.yaml', '.py']:
159
  text = f.read().decode('utf-8')
160
+ print(f"Extracted text from {file_path}:\n{text[:50]}...\n")
161
  elif file_ext in ['.svg']:
162
  text = f"SVG file content from {file_path}"
163
  elif file_ext in ['.png', '.ico']: