Skip to content

Commit 9bdaa90

Browse files
Added youtube link
1 parent 537fcf6 commit 9bdaa90

File tree

1 file changed

+59
-41
lines changed

1 file changed

+59
-41
lines changed

Chroma_DB_with_Langchain.ipynb

+59-41
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
56
"metadata": {
6-
"id": "view-in-github",
7-
"colab_type": "text"
7+
"colab_type": "text",
8+
"id": "view-in-github"
89
},
910
"source": [
1011
"<a href=\"https://colab.research.google.com/github/PradipNichite/Youtube-Tutorials/blob/main/Chroma_DB_with_Langchain.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
1112
]
1213
},
1314
{
15+
"attachments": {},
1416
"cell_type": "markdown",
1517
"metadata": {
1618
"id": "bg8ifNQrixEV"
@@ -26,6 +28,14 @@
2628
"6. Utilizing RetrieverQA Chain"
2729
]
2830
},
31+
{
32+
"attachments": {},
33+
"cell_type": "markdown",
34+
"metadata": {},
35+
"source": [
36+
"Youtube Video : https://youtu.be/5NG8mefEsCU"
37+
]
38+
},
2939
{
3040
"cell_type": "code",
3141
"execution_count": null,
@@ -50,13 +60,14 @@
5060
]
5161
},
5262
{
63+
"attachments": {},
5364
"cell_type": "markdown",
54-
"source": [
55-
"Files Used : https://github.com/PradipNichite/Youtube-Tutorials/tree/main/chroma_db/pets"
56-
],
5765
"metadata": {
5866
"id": "uoRSOD0gApuQ"
59-
}
67+
},
68+
"source": [
69+
"Files Used : https://github.com/PradipNichite/Youtube-Tutorials/tree/main/chroma_db/pets"
70+
]
6071
},
6172
{
6273
"cell_type": "code",
@@ -70,8 +81,8 @@
7081
},
7182
"outputs": [
7283
{
73-
"output_type": "stream",
7484
"name": "stderr",
85+
"output_type": "stream",
7586
"text": [
7687
"[nltk_data] Downloading package punkt to /root/nltk_data...\n",
7788
"[nltk_data] Unzipping tokenizers/punkt.zip.\n",
@@ -81,14 +92,14 @@
8192
]
8293
},
8394
{
84-
"output_type": "execute_result",
8595
"data": {
8696
"text/plain": [
8797
"5"
8898
]
8999
},
100+
"execution_count": 5,
90101
"metadata": {},
91-
"execution_count": 5
102+
"output_type": "execute_result"
92103
}
93104
],
94105
"source": [
@@ -106,6 +117,7 @@
106117
]
107118
},
108119
{
120+
"attachments": {},
109121
"cell_type": "markdown",
110122
"metadata": {
111123
"id": "fsGlTgCjubbU"
@@ -126,8 +138,8 @@
126138
},
127139
"outputs": [
128140
{
129-
"output_type": "stream",
130141
"name": "stdout",
142+
"output_type": "stream",
131143
"text": [
132144
"5\n"
133145
]
@@ -186,28 +198,28 @@
186198
},
187199
{
188200
"cell_type": "code",
189-
"source": [
190-
"matching_docs[0]"
191-
],
201+
"execution_count": null,
192202
"metadata": {
193203
"colab": {
194204
"base_uri": "https://localhost:8080/"
195205
},
196206
"id": "1PT-WlSapxS9",
197207
"outputId": "bd1fff3f-9ecf-4629-9edd-58f656ff0a53"
198208
},
199-
"execution_count": null,
200209
"outputs": [
201210
{
202-
"output_type": "execute_result",
203211
"data": {
204212
"text/plain": [
205213
"Document(page_content='Pet animals come in all shapes and sizes, each suited to different lifestyles and home environments. Dogs and cats are the most common, known for their companionship and unique personalities. Small mammals like hamsters, guinea pigs, and rabbits are often chosen for their low maintenance needs. Birds offer beauty and song, and reptiles like turtles and lizards can make intriguing pets. Even fish, with their calming presence, can be wonderful pets.', metadata={'source': '/content/pets/Different Types of Pet Animals.txt'})"
206214
]
207215
},
216+
"execution_count": 13,
208217
"metadata": {},
209-
"execution_count": 13
218+
"output_type": "execute_result"
210219
}
220+
],
221+
"source": [
222+
"matching_docs[0]"
211223
]
212224
},
213225
{
@@ -222,8 +234,8 @@
222234
},
223235
"outputs": [
224236
{
225-
"output_type": "stream",
226237
"name": "stdout",
238+
"output_type": "stream",
227239
"text": [
228240
"Pet animals come in all shapes and sizes, each suited to different lifestyles and home environments. Dogs and cats are the most common, known for their companionship and unique personalities. Small mammals like hamsters, guinea pigs, and rabbits are often chosen for their low maintenance needs. Birds offer beauty and song, and reptiles like turtles and lizards can make intriguing pets. Even fish, with their calming presence, can be wonderful pets.\n"
229241
]
@@ -245,7 +257,6 @@
245257
},
246258
"outputs": [
247259
{
248-
"output_type": "execute_result",
249260
"data": {
250261
"text/plain": [
251262
"[(Document(page_content='Pet animals come in all shapes and sizes, each suited to different lifestyles and home environments. Dogs and cats are the most common, known for their companionship and unique personalities. Small mammals like hamsters, guinea pigs, and rabbits are often chosen for their low maintenance needs. Birds offer beauty and song, and reptiles like turtles and lizards can make intriguing pets. Even fish, with their calming presence, can be wonderful pets.', metadata={'source': '/content/pets/Different Types of Pet Animals.txt'}),\n",
@@ -254,8 +265,9 @@
254265
" 1.039680004119873)]"
255266
]
256267
},
268+
"execution_count": 14,
257269
"metadata": {},
258-
"execution_count": 14
270+
"output_type": "execute_result"
259271
}
260272
],
261273
"source": [
@@ -264,6 +276,7 @@
264276
]
265277
},
266278
{
279+
"attachments": {},
267280
"cell_type": "markdown",
268281
"metadata": {
269282
"id": "RarKpNFRxeqE"
@@ -321,15 +334,15 @@
321334
},
322335
"outputs": [
323336
{
324-
"output_type": "execute_result",
325337
"data": {
326338
"text/plain": [
327339
"(Document(page_content='Pet animals come in all shapes and sizes, each suited to different lifestyles and home environments. Dogs and cats are the most common, known for their companionship and unique personalities. Small mammals like hamsters, guinea pigs, and rabbits are often chosen for their low maintenance needs. Birds offer beauty and song, and reptiles like turtles and lizards can make intriguing pets. Even fish, with their calming presence, can be wonderful pets.', metadata={'source': '/content/pets/Different Types of Pet Animals.txt'}),\n",
328340
" 0.7325009703636169)"
329341
]
330342
},
343+
"execution_count": 18,
331344
"metadata": {},
332-
"execution_count": 18
345+
"output_type": "execute_result"
333346
}
334347
],
335348
"source": [
@@ -338,6 +351,7 @@
338351
]
339352
},
340353
{
354+
"attachments": {},
341355
"cell_type": "markdown",
342356
"metadata": {
343357
"id": "O0PLEMthiKlZ"
@@ -372,6 +386,7 @@
372386
]
373387
},
374388
{
389+
"attachments": {},
375390
"cell_type": "markdown",
376391
"metadata": {
377392
"id": "TQs4TYrehkfH"
@@ -381,6 +396,7 @@
381396
]
382397
},
383398
{
399+
"attachments": {},
384400
"cell_type": "markdown",
385401
"metadata": {
386402
"id": "lvAgR_85d468"
@@ -417,8 +433,8 @@
417433
},
418434
"outputs": [
419435
{
420-
"output_type": "stream",
421436
"name": "stdout",
437+
"output_type": "stream",
422438
"text": [
423439
"\n",
424440
"\n",
@@ -445,17 +461,17 @@
445461
]
446462
},
447463
{
448-
"output_type": "execute_result",
449464
"data": {
450-
"text/plain": [
451-
"\"Owning a pet can provide emotional support, reduce stress and anxiety, and can even help their owners lead healthier lives. Pets are known to offer companionship, loyalty, and comfort, and many people consider their pets as part of the family. The bond between pets and their owners can be especially important in times of personal or societal stress, providing comfort and consistency. Overall, owning a pet can have a positive impact on one's mental health and well-being.\""
452-
],
453465
"application/vnd.google.colaboratory.intrinsic+json": {
454466
"type": "string"
455-
}
467+
},
468+
"text/plain": [
469+
"\"Owning a pet can provide emotional support, reduce stress and anxiety, and can even help their owners lead healthier lives. Pets are known to offer companionship, loyalty, and comfort, and many people consider their pets as part of the family. The bond between pets and their owners can be especially important in times of personal or societal stress, providing comfort and consistency. Overall, owning a pet can have a positive impact on one's mental health and well-being.\""
470+
]
456471
},
472+
"execution_count": 24,
457473
"metadata": {},
458-
"execution_count": 24
474+
"output_type": "execute_result"
459475
}
460476
],
461477
"source": [
@@ -466,13 +482,15 @@
466482
]
467483
},
468484
{
485+
"attachments": {},
469486
"cell_type": "markdown",
470487
"metadata": {
471488
"id": "bqKsMU8_fLEX"
472489
},
473490
"source": []
474491
},
475492
{
493+
"attachments": {},
476494
"cell_type": "markdown",
477495
"metadata": {
478496
"id": "y-5jx4A0has6"
@@ -485,26 +503,26 @@
485503
"cell_type": "code",
486504
"execution_count": null,
487505
"metadata": {
488-
"id": "fSq1AH9hmefz",
489506
"colab": {
490507
"base_uri": "https://localhost:8080/",
491508
"height": 70
492509
},
510+
"id": "fSq1AH9hmefz",
493511
"outputId": "714ffb37-8f36-4156-f32a-0bd3da1a0616"
494512
},
495513
"outputs": [
496514
{
497-
"output_type": "execute_result",
498515
"data": {
499-
"text/plain": [
500-
"'Owning a pet can provide emotional support and reduce stress. Pets can also offer comfort and consistency in times of personal or societal stress. Additionally, many people consider their pets as part of the family, which can create a strong bond between pets and their owners.'"
501-
],
502516
"application/vnd.google.colaboratory.intrinsic+json": {
503517
"type": "string"
504-
}
518+
},
519+
"text/plain": [
520+
"'Owning a pet can provide emotional support and reduce stress. Pets can also offer comfort and consistency in times of personal or societal stress. Additionally, many people consider their pets as part of the family, which can create a strong bond between pets and their owners.'"
521+
]
505522
},
523+
"execution_count": 25,
506524
"metadata": {},
507-
"execution_count": 25
525+
"output_type": "execute_result"
508526
}
509527
],
510528
"source": [
@@ -515,19 +533,19 @@
515533
},
516534
{
517535
"cell_type": "code",
518-
"source": [],
536+
"execution_count": null,
519537
"metadata": {
520538
"id": "YuBnD9RbsP8U"
521539
},
522-
"execution_count": null,
523-
"outputs": []
540+
"outputs": [],
541+
"source": []
524542
}
525543
],
526544
"metadata": {
527545
"colab": {
528-
"provenance": [],
529546
"authorship_tag": "ABX9TyNyvtC67lt0rjksvsVD/bdI",
530-
"include_colab_link": true
547+
"include_colab_link": true,
548+
"provenance": []
531549
},
532550
"kernelspec": {
533551
"display_name": "Python 3",
@@ -539,4 +557,4 @@
539557
},
540558
"nbformat": 4,
541559
"nbformat_minor": 0
542-
}
560+
}

0 commit comments

Comments
 (0)