Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ def preview_csv(file):
|
|
6 |
if file is None:
|
7 |
return "No file uploaded."
|
8 |
try:
|
9 |
-
df = pd.read_csv(file.name)
|
10 |
return df.head() # Show the first 5 rows
|
11 |
except Exception as e:
|
12 |
return f"Error reading CSV: {e}"
|
|
|
6 |
if file is None:
|
7 |
return "No file uploaded."
|
8 |
try:
|
9 |
+
df = pd.read_csv(file.name,encoding='latin1')
|
10 |
return df.head() # Show the first 5 rows
|
11 |
except Exception as e:
|
12 |
return f"Error reading CSV: {e}"
|