Spaces:
Sleeping
Sleeping
Rename sql_agent_db.py to app.py
Browse files- sql_agent_db.py → app.py +2 -2
sql_agent_db.py → app.py
RENAMED
@@ -23,12 +23,12 @@ from langchain_community.utilities import SQLDatabase
|
|
23 |
# Create db from csv file
|
24 |
|
25 |
# Path to your SQLite database file
|
26 |
-
database_file_path = "
|
27 |
|
28 |
# Create an engine to connect to the SQLite database
|
29 |
# SQLite only requires the path to the database file
|
30 |
engine = create_engine(f"sqlite:///{database_file_path}")
|
31 |
-
file_url = "./
|
32 |
os.makedirs(os.path.dirname(database_file_path), exist_ok=True)
|
33 |
|
34 |
df = pd.read_csv(file_url)
|
|
|
23 |
# Create db from csv file
|
24 |
|
25 |
# Path to your SQLite database file
|
26 |
+
database_file_path = "data_science_100k.db"
|
27 |
|
28 |
# Create an engine to connect to the SQLite database
|
29 |
# SQLite only requires the path to the database file
|
30 |
engine = create_engine(f"sqlite:///{database_file_path}")
|
31 |
+
file_url = "./Struct Data_Data Science 100K.csv"
|
32 |
os.makedirs(os.path.dirname(database_file_path), exist_ok=True)
|
33 |
|
34 |
df = pd.read_csv(file_url)
|