Spaces:
Sleeping
Sleeping
Update services/utils.py
Browse files- services/utils.py +8 -0
services/utils.py
CHANGED
@@ -159,4 +159,12 @@ def extract_text_from_attachment(filename, data):
|
|
159 |
# Add handling for other document types if needed
|
160 |
return "Unsupported document type"
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
|
|
159 |
# Add handling for other document types if needed
|
160 |
return "Unsupported document type"
|
161 |
|
162 |
+
def extract_text_from_attachment_outlook(filename , data):
|
163 |
+
if filename.endswith('.pdf'):
|
164 |
+
return extract_text_from_pdf(data)
|
165 |
+
elif filename.endswith('.docx'):
|
166 |
+
return extract_text_from_docx(data)
|
167 |
+
else:
|
168 |
+
return "Unsupported document type"
|
169 |
+
|
170 |
|