Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ from llama_index.vector_stores import ChromaVectorStore
|
|
9 |
from llama_index.storage.storage_context import StorageContext
|
10 |
import chromadb
|
11 |
from llama_index.readers.wikipedia import WikipediaReader
|
|
|
12 |
from llama_index.tools import FunctionTool
|
13 |
from llama_index.vector_stores.types import (
|
14 |
VectorStoreInfo,
|
@@ -156,6 +157,10 @@ async def init():
|
|
156 |
"oppenheimer",
|
157 |
engine
|
158 |
)
|
|
|
|
|
|
|
|
|
159 |
|
160 |
sql_query_engine = NLSQLTableQueryEngine(
|
161 |
sql_database=sql_database,
|
|
|
9 |
from llama_index.storage.storage_context import StorageContext
|
10 |
import chromadb
|
11 |
from llama_index.readers.wikipedia import WikipediaReader
|
12 |
+
from llama_index import SQLDatabase
|
13 |
from llama_index.tools import FunctionTool
|
14 |
from llama_index.vector_stores.types import (
|
15 |
VectorStoreInfo,
|
|
|
157 |
"oppenheimer",
|
158 |
engine
|
159 |
)
|
160 |
+
|
161 |
+
sql_database = SQLDatabase(
|
162 |
+
engine,
|
163 |
+
include_tables=['barbie', 'oppenheimer'])
|
164 |
|
165 |
sql_query_engine = NLSQLTableQueryEngine(
|
166 |
sql_database=sql_database,
|