Skip to content

Commit

Permalink
🚀 feat: Allow pptx Upload (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyking363 authored Jun 26, 2024
1 parent 1d58df5 commit c289c20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
UnstructuredXMLLoader,
UnstructuredRSTLoader,
UnstructuredExcelLoader,
UnstructuredPowerPointLoader,
)

from models import (
Expand Down Expand Up @@ -285,6 +286,8 @@ def get_loader(filename: str, file_content_type: str, filepath: str):
loader = UnstructuredRSTLoader(filepath, mode="elements")
elif file_ext == "xml":
loader = UnstructuredXMLLoader(filepath)
elif file_ext == "pptx":
loader = UnstructuredPowerPointLoader(filepath)
elif file_ext == "md":
loader = UnstructuredMarkdownLoader(filepath)
elif file_content_type == "application/epub+zip":
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ opencv-python-headless==4.9.0.80
pymongo==4.6.3
langchain-mongodb==0.1.3
cryptography==42.0.7
python-magic==0.4.27
python-pptx==0.6.23

0 comments on commit c289c20

Please sign in to comment.