Spaces:
Runtime error
Runtime error
Chintan-Donda
commited on
Commit
•
f181070
1
Parent(s):
f2cf223
Update src/data_loader.py
Browse files- src/data_loader.py +2 -2
src/data_loader.py
CHANGED
@@ -4,7 +4,7 @@ import pandas as pd
|
|
4 |
from pathlib import Path
|
5 |
import glob
|
6 |
|
7 |
-
from llama_index import
|
8 |
from langchain.document_loaders import PyPDFLoader, TextLoader
|
9 |
from langchain.agents import initialize_agent, Tool
|
10 |
from langchain.llms import OpenAI
|
@@ -170,7 +170,7 @@ class DATA_LOADER:
|
|
170 |
# Load data from URLs
|
171 |
documents = loader.load_data(urls=urls)
|
172 |
# Build the Vector database
|
173 |
-
index =
|
174 |
tools = [
|
175 |
Tool(
|
176 |
name="Website Index",
|
|
|
4 |
from pathlib import Path
|
5 |
import glob
|
6 |
|
7 |
+
from llama_index import GPTVectorStoreIndex, download_loader, SimpleDirectoryReader, SimpleWebPageReader
|
8 |
from langchain.document_loaders import PyPDFLoader, TextLoader
|
9 |
from langchain.agents import initialize_agent, Tool
|
10 |
from langchain.llms import OpenAI
|
|
|
170 |
# Load data from URLs
|
171 |
documents = loader.load_data(urls=urls)
|
172 |
# Build the Vector database
|
173 |
+
index = GPTVectorStoreIndex(documents)
|
174 |
tools = [
|
175 |
Tool(
|
176 |
name="Website Index",
|