Update app.py
Browse files
app.py
CHANGED
|
@@ -8,10 +8,8 @@ import pandas as pd
|
|
| 8 |
load_dotenv()
|
| 9 |
groq_api_key = os.getenv("groq_api_key")
|
| 10 |
|
| 11 |
-
|
| 12 |
-
dataset_folder = "./data" # Assuming files are in a 'data/' folder
|
| 13 |
|
| 14 |
-
# Verify the folder exists
|
| 15 |
if not os.path.exists(dataset_folder):
|
| 16 |
print(f"Warning: Dataset folder '{dataset_folder}' not found. Using current directory instead.")
|
| 17 |
dataset_folder = "." # Fallback: Look in the current directory
|
|
@@ -27,7 +25,7 @@ warnings.simplefilter("ignore", category=pd.errors.DtypeWarning)
|
|
| 27 |
# Load all CSV files in the dataset folder
|
| 28 |
dataframes = []
|
| 29 |
for file in os.listdir(dataset_folder):
|
| 30 |
-
if file.endswith(".csv"):
|
| 31 |
try:
|
| 32 |
# Read first few rows to identify column names
|
| 33 |
sample_df = pd.read_csv(
|
|
|
|
| 8 |
load_dotenv()
|
| 9 |
groq_api_key = os.getenv("groq_api_key")
|
| 10 |
|
| 11 |
+
dataset_folder = "./data"
|
|
|
|
| 12 |
|
|
|
|
| 13 |
if not os.path.exists(dataset_folder):
|
| 14 |
print(f"Warning: Dataset folder '{dataset_folder}' not found. Using current directory instead.")
|
| 15 |
dataset_folder = "." # Fallback: Look in the current directory
|
|
|
|
| 25 |
# Load all CSV files in the dataset folder
|
| 26 |
dataframes = []
|
| 27 |
for file in os.listdir(dataset_folder):
|
| 28 |
+
if file.endswith(".csv"):
|
| 29 |
try:
|
| 30 |
# Read first few rows to identify column names
|
| 31 |
sample_df = pd.read_csv(
|