Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,7 @@ import torch
|
|
20 |
os.environ['HuggingFaceHub_API_Token']= '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'
|
21 |
loader = UnstructuredFileLoader('Highway Traffic Act, R.S.O. 1990, c. H.8.pdf')
|
22 |
documents = loader.load()
|
|
|
23 |
text_splitter=CharacterTextSplitter(separator='\n',chunk_size=1500,chunk_overlap=300)
|
24 |
text_chunks=text_splitter.split_documents(documents)
|
25 |
embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2',model_kwargs={'device': 'cuda'})
|
|
|
20 |
os.environ['HuggingFaceHub_API_Token']= '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'
|
21 |
loader = UnstructuredFileLoader('Highway Traffic Act, R.S.O. 1990, c. H.8.pdf')
|
22 |
documents = loader.load()
|
23 |
+
print("Hello")
|
24 |
text_splitter=CharacterTextSplitter(separator='\n',chunk_size=1500,chunk_overlap=300)
|
25 |
text_chunks=text_splitter.split_documents(documents)
|
26 |
embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2',model_kwargs={'device': 'cuda'})
|