Created
August 12, 2023 17:35
-
-
Save vhxs/ab17d4d0ec47610c2b4010afdc0486c6 to your computer and use it in GitHub Desktop.
Using LangChain to ask about one of my papers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langchain.document_loaders import OnlinePDFLoader | |
from langchain.indexes import VectorstoreIndexCreator | |
loader = OnlinePDFLoader("https://arxiv.org/pdf/1606.06353.pdf") | |
documents = loader.load() | |
index = VectorstoreIndexCreator().from_documents(documents) | |
print(index.query("What are the main results of this paper?")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment