Spaces:
Sleeping
Sleeping
columns error
Browse files
app.py
CHANGED
|
@@ -10,6 +10,16 @@ def process_tables(table1_path, table2_path, harmonization, columns_embeddings_c
|
|
| 10 |
table1 = pd.read_csv(table1_path)
|
| 11 |
table2 = pd.read_csv(table2_path)
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Process the tables using a function from functions.py
|
| 14 |
result_final = functions.process_similarity_results(table1, table2, harmonization, columns_embeddings_col1, columns_embeddings_col2)
|
| 15 |
|
|
|
|
| 10 |
table1 = pd.read_csv(table1_path)
|
| 11 |
table2 = pd.read_csv(table2_path)
|
| 12 |
|
| 13 |
+
try:
|
| 14 |
+
table1 = pd.read_csv(table1_path, encoding='utf-8')
|
| 15 |
+
except UnicodeDecodeError:
|
| 16 |
+
table1 = pd.read_csv(table1_path, encoding='ISO-8859-1') # Or 'cp1252' if 'ISO-8859-1' doesn't work
|
| 17 |
+
|
| 18 |
+
try:
|
| 19 |
+
table2 = pd.read_csv(table2_path, encoding='utf-8')
|
| 20 |
+
except UnicodeDecodeError:
|
| 21 |
+
table2 = pd.read_csv(table2_path, encoding='ISO-8859-1')
|
| 22 |
+
|
| 23 |
# Process the tables using a function from functions.py
|
| 24 |
result_final = functions.process_similarity_results(table1, table2, harmonization, columns_embeddings_col1, columns_embeddings_col2)
|
| 25 |
|