Find answers from the community

Updated 2 months ago

Hey there, as far as I see the right way

Hey there, as far as I see the right way now to read pptx files is via importing

from llama_index.readers.file import PptxReader

However, when calling this I get

ImportError: Please install extra dependencies that are required for the PptxReader: pip install torch transformers python-pptx Pillow

This happens as images may be read via a tranfomers package within the reader. However, I dot not necessarily want to include the transformers package in a openai based rag app. The way to circument this before was via the llamahub pptx reader, but this does not work anymore after the update. Whats the current best practice to read pptx files without installing transformers package?
1
W
e
L
6 comments
Did you perform: pip install llama-index-readers-file ?

If so, then it should not throw error for import IMO
true, sorry, the error comes when calling the loader
hmm I don't think there is a way at the moment.

tbh the loader code is super simple though, you could just copy-paste the source code and edit as needed

Otherwise we need a PR to add some more options to the loader
Thats what I did then, thx, just wanted to know
Hey, @ejmiddle how did you circumvent that pptx issue; I am still battling with it!
Add a reply
Sign up and join the conversation on Discord