Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -164,6 +164,16 @@ def process_directory(directory, folder_paths, file_paths):
|
|
| 164 |
all_texts.append(text)
|
| 165 |
file_references.append(file_path)
|
| 166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
return all_texts, file_references
|
| 168 |
|
| 169 |
# with tempfile.TemporaryDirectory() as tmpdirname:
|
|
|
|
| 164 |
all_texts.append(text)
|
| 165 |
file_references.append(file_path)
|
| 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
|
| 178 |
|
| 179 |
# with tempfile.TemporaryDirectory() as tmpdirname:
|