Skip to content

Instantly share code, notes, and snippets.

@neelabalan
Created September 17, 2023 15:21
Show Gist options
  • Save neelabalan/f874e69043aba7a865f33a84f6a0b149 to your computer and use it in GitHub Desktop.
Save neelabalan/f874e69043aba7a865f33a84f6a0b149 to your computer and use it in GitHub Desktop.
from langchain.document_loaders import WebBaseLoader
from langchain.indexes import VectorstoreIndexCreator
loader = WebBaseLoader('https://jj09.net/simple-path-to-weight-loss/')
index = VectorstoreIndexCreator().from_loaders([loader])
print(index.query('how many colories should I consume to lose weight'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment