Skip to content

Commit

Permalink
tutorial22
Browse files Browse the repository at this point in the history
  • Loading branch information
ronidas39 committed Dec 25, 2023
1 parent e06a68e commit 62f9f6f
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tutorial22/all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from langchain.document_loaders import DirectoryLoader
import os
loader=DirectoryLoader(path=os.getcwd(),glob="**/*.csv")
docs=loader.load()
print(len(docs))
4 changes: 4 additions & 0 deletions tutorial22/sample copy 2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy 3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy 4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy 5.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy 6.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy 7.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy 8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy 9.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample copy.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/sample.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,country,company
roni,india,google
john,japan,facebook
bob,australia,tesla
4 changes: 4 additions & 0 deletions tutorial22/simple.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
this is simple txt file
this is simple txt file
this is simple txt file
this is simple txt file
5 changes: 5 additions & 0 deletions tutorial22/simple_csv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from langchain.document_loaders.csv_loader import CSVLoader
loader=CSVLoader("sample.csv")
doc=loader.load()
for d in doc:
print(d.page_content)
6 changes: 6 additions & 0 deletions tutorial22/simple_txt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from langchain.document_loaders import TextLoader

loader=TextLoader("simple.txt")
doc=loader.load()
for d in doc:
print(d.page_content)
Binary file modified tutorial22/tutorial22.pptx
Binary file not shown.

0 comments on commit 62f9f6f

Please sign in to comment.