Spaces:
Sleeping
Sleeping
Update summarizer.py
Browse files- summarizer.py +1 -1
summarizer.py
CHANGED
@@ -11,7 +11,7 @@ def summarize_files(method, files):
|
|
11 |
# Load and read each file
|
12 |
for file in files:
|
13 |
|
14 |
-
ext = Path(
|
15 |
if ext == '.pdf':
|
16 |
loader = PyPDFLoader(file)
|
17 |
elif ext == '.docx':
|
|
|
11 |
# Load and read each file
|
12 |
for file in files:
|
13 |
|
14 |
+
ext = Path(file).suffix.lower()
|
15 |
if ext == '.pdf':
|
16 |
loader = PyPDFLoader(file)
|
17 |
elif ext == '.docx':
|