Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,10 @@ def process_csv(file):
|
|
| 13 |
# Read the CSV file using Pandas
|
| 14 |
df = pd.read_csv(file.name) # Ensure correct file path
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# Check for 'text' column
|
| 17 |
if 'text' not in df.columns:
|
| 18 |
return "Error: The CSV file must contain a 'text' column."
|
|
|
|
| 13 |
# Read the CSV file using Pandas
|
| 14 |
df = pd.read_csv(file.name) # Ensure correct file path
|
| 15 |
|
| 16 |
+
# Debugging: Print the DataFrame shape and columns
|
| 17 |
+
print(f"DataFrame shape: {df.shape}")
|
| 18 |
+
print(f"DataFrame columns: {df.columns.tolist()}")
|
| 19 |
+
|
| 20 |
# Check for 'text' column
|
| 21 |
if 'text' not in df.columns:
|
| 22 |
return "Error: The CSV file must contain a 'text' column."
|