Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import faiss
|
|
| 8 |
import re
|
| 9 |
import json
|
| 10 |
import pandas as pd
|
| 11 |
-
from docx import Document
|
| 12 |
from pptx import Presentation
|
| 13 |
from sentence_transformers import SentenceTransformer
|
| 14 |
from concurrent.futures import ThreadPoolExecutor
|
|
@@ -70,7 +70,7 @@ class DocumentProcessor:
|
|
| 70 |
text = f.read()
|
| 71 |
elif file_path.endswith('.pptx'):
|
| 72 |
text = self.extract_text_from_pptx(file_path)
|
| 73 |
-
elif file_path.endswith(('.xls', '.xlsx', '.csv')):
|
| 74 |
text = self.extract_text_from_xls_csv(file_path)
|
| 75 |
else:
|
| 76 |
return ""
|
|
|
|
| 8 |
import re
|
| 9 |
import json
|
| 10 |
import pandas as pd
|
| 11 |
+
from docx import Document
|
| 12 |
from pptx import Presentation
|
| 13 |
from sentence_transformers import SentenceTransformer
|
| 14 |
from concurrent.futures import ThreadPoolExecutor
|
|
|
|
| 70 |
text = f.read()
|
| 71 |
elif file_path.endswith('.pptx'):
|
| 72 |
text = self.extract_text_from_pptx(file_path)
|
| 73 |
+
elif file_path.endswith(('.xls', '.xlsx', '.csv')):
|
| 74 |
text = self.extract_text_from_xls_csv(file_path)
|
| 75 |
else:
|
| 76 |
return ""
|