Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shauryr committed Jan 15, 2024
1 parent a50701f commit 845c2ca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/05-llama_hub.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"## Using Ragatouille with llama-hub loaders\n",
"\n",
"Use any loader from llama-hub with ragatouille!"
"Use any loader from llama-hub with ragatouille!\n"
]
},
{
Expand Down Expand Up @@ -167,11 +167,12 @@
],
"source": [
"from llama_index import download_loader\n",
"\n",
"RAG = RAGPretrainedModel.from_pretrained(\"colbert-ir/colbertv2.0\")\n",
"PubmedReader = download_loader(\"PubmedReader\")\n",
"\n",
"loader = PubmedReader()\n",
"documents = loader.load_data(search_query='covid 19 vaccine')\n",
"documents = loader.load_data(search_query=\"covid 19 vaccine\")\n",
"\n",
"list_vaccine_papers = [document.text for document in documents]\n",
"\n",
Expand Down Expand Up @@ -332,6 +333,7 @@
],
"source": [
"from llama_hub.semanticscholar import SemanticScholarReader\n",
"\n",
"RAG = RAGPretrainedModel.from_pretrained(\"colbert-ir/colbertv2.0\")\n",
"query_space = \"biases in language models\"\n",
"\n",
Expand Down Expand Up @@ -480,6 +482,7 @@
"source": [
"from pathlib import Path\n",
"from llama_index import download_loader\n",
"\n",
"RAG = RAGPretrainedModel.from_pretrained(\"colbert-ir/colbertv2.0\")\n",
"\n",
"PDFReader = download_loader(\"PDFReader\")\n",
Expand Down Expand Up @@ -590,8 +593,6 @@
"source": [
"list_pdf_documents = [document.text for document in documents]\n",
"\n",
"# reload\n",
"RAG = RAGPretrainedModel.from_pretrained(\"colbert-ir/colbertv2.0\")\n",
"\n",
"RAG.index(\n",
" collection=list_pdf_documents,\n",
Expand Down

0 comments on commit 845c2ca

Please sign in to comment.