Closed smach closed 1 year ago
Hi @smach:
The call to ingest
in this Google Colab notebook seems to work fine and all CI tests pass including ones with ingest
.
That error usually indicates that you need to place code in a if __name__ == '__main__':
guard (as mentioned in this post).
Are you running this in a Jupyter notebook? Or, are you putting the code in a .py
file and running it (with python my_file.py
, for example)? If the latter, perhaps you may need to do this:
if __name__ == '__main__':
from onprem import LLM
llm = LLM()
llm.ingest('./sample_docs/')`
Thank you, I am indeed running it in a local .py file, and that stops the error. (I'm now having problems with the correct version of pymupdf which probably has nothing to do with this package. I suspect I need to improve my knowledge of Python sysadmin and then try again sometime.)
(Closing)
This very well may be my fault, since my Python knowledge is rather basic. But when trying to follow the ingest document examples with my own documents using the code
I get the error below
This happens both on my Mac and on my Windows PC.
Below code works fine, though.