Spaces:
Sleeping
Sleeping
File size: 305 Bytes
d1a818a | 1 2 3 4 5 6 7 8 9 10 11 | import pandas as pd
from sqlalchemy import create_engine
from langchain_community.utilities import SQLDatabase
from langchain.chains import LLMChain
def get_engine(db_file="business_data.db"):
return create_engine(f"sqlite:///{db_file}")
def get_db(engine):
return SQLDatabase(engine)
|