Skip to content

Commit

Permalink
fix: install lib
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Sep 27, 2023
1 parent dd2a8ba commit 4840802
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions LangChain/LangChain_Vector_Search_on_PDF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"tags": []
},
"source": [
"**Last update:** 2023-07-31 (Created: 2023-07-10)"
"**Last update:** 2023-09-27 (Created: 2023-09-27)"
]
},
{
Expand Down Expand Up @@ -119,10 +119,19 @@
"source": [
"try:\n",
" import langchain\n",
"except ModuleNotFoundError:\n",
" !pip install langchain --user\n",
" import langchain\n",
"try:\n",
" import PyPDF2\n",
"except ModuleNotFoundError:\n",
" !pip install PyPDF2 --user\n",
" import PyPDF2\n",
"try:\n",
" import weaviate\n",
"except ModuleNotFoundError:\n",
" !pip install langchain PyPDF2 weaviate-client==3.20.0\n",
" !pip install weaviate-client==3.20.0 --user\n",
" import weaviate\n",
" \n",
"# Note: This installation make take more time than usual due to more dependencies {uncomment if there is some error in the embeddings routine}\n",
"# !pip install sentence_transformers --user\n",
Expand All @@ -131,8 +140,6 @@
"import naas\n",
"import io\n",
"import requests\n",
"import PyPDF2\n",
"import weaviate\n",
"from langchain.text_splitter import CharacterTextSplitter\n",
"from langchain.embeddings import HuggingFaceEmbeddings\n",
"from langchain.vectorstores import Weaviate"
Expand Down Expand Up @@ -358,6 +365,14 @@
"response = docs[0].page_content\n",
"response"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5e2bc7f1-acf9-402b-b0aa-93de14764f8b",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 4840802

Please sign in to comment.