Victor Rivera commited on
Commit
e71effe
1 Parent(s): 372abc5

DataPath de HuggingFace

Browse files
Files changed (1) hide show
  1. dataBaseSetup.py +14 -10
dataBaseSetup.py CHANGED
@@ -1,5 +1,6 @@
1
  import sqlite3
2
  import pandas as pd
 
3
 
4
  def create_connection():
5
  """ Create a database connection to the SQLite database """
@@ -128,16 +129,19 @@ def main():
128
 
129
  # Data import paths
130
  data_paths = {
131
- "customers": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/customers.csv",
132
- "staffs": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/staffs.csv",
133
- "products": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/products.csv",
134
- "categories": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/categories.csv",
135
- "stores": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/stores.csv",
136
- "brands": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/brands.csv",
137
- "stocks": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/stocks.csv",
138
- "orders": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/orders.csv",
139
- "order_items": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/order_items.csv",
140
- }
 
 
 
141
 
142
  # Import data to tables
143
  for table_name, csv_path in data_paths.items():
 
1
  import sqlite3
2
  import pandas as pd
3
+ from datasets import load_dataset
4
 
5
  def create_connection():
6
  """ Create a database connection to the SQLite database """
 
129
 
130
  # Data import paths
131
  data_paths = {
132
+ "customers": "CSV/customers.csv",
133
+ "staffs": "CSV/staffs.csv",
134
+ "products": "CSV/products.csv",
135
+ "categories": "CSV/categories.csv",
136
+ "stores": "CSV/stores.csv",
137
+ "brands": "CSV/brands.csv",
138
+ "stocks": "CSV/stocks.csv",
139
+ "orders": "CSV/orders.csv",
140
+ "order_items": "CSV/order_items.csv",
141
+ }
142
+
143
+ dataset = load_dataset('VicGerardoPR/InteractiveDatabseApp', data_files=data_paths)
144
+
145
 
146
  # Import data to tables
147
  for table_name, csv_path in data_paths.items():