bupa1018 commited on
Commit
8368902
·
1 Parent(s): 5de28f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -154,6 +154,7 @@ def process_directory(directory, folder_paths, file_paths):
154
  with open(file_path, 'rb') as f:
155
  if file_ext in ['.rst', '.md', '.txt', '.html', '.json', '.yaml', '.py']:
156
  text = f.read().decode('utf-8')
 
157
  elif file_ext in ['.svg']:
158
  text = f"SVG file content from {file_path}"
159
  elif file_ext in ['.png', '.ico']:
@@ -166,12 +167,7 @@ def process_directory(directory, folder_paths, file_paths):
166
 
167
  # Add this snippet after the 'all_texts.append(text)' and 'file_references.append(file_path)' lines.
168
 
169
- print("\n" + "-" * 50) # Print horizontal line
170
- for i, (text, reference) in enumerate(zip(all_texts, file_references)):
171
- print(f"File {i + 1}:")
172
- print(f"Reference: {reference}")
173
- print(f"Content:\n{text}")
174
- print("\n" + "-" * 50) # Print horizontal line again
175
 
176
 
177
  return all_texts, file_references
 
154
  with open(file_path, 'rb') as f:
155
  if file_ext in ['.rst', '.md', '.txt', '.html', '.json', '.yaml', '.py']:
156
  text = f.read().decode('utf-8')
157
+
158
  elif file_ext in ['.svg']:
159
  text = f"SVG file content from {file_path}"
160
  elif file_ext in ['.png', '.ico']:
 
167
 
168
  # Add this snippet after the 'all_texts.append(text)' and 'file_references.append(file_path)' lines.
169
 
170
+ print(f"The length of all_texts is: {len(all_texts)}")
 
 
 
 
 
171
 
172
 
173
  return all_texts, file_references