Spaces:
Running
Running
Commit
·
d44b620
1
Parent(s):
205d5cc
fix csv_reading
Browse files- utilities.py +4 -5
utilities.py
CHANGED
@@ -62,11 +62,10 @@ def read_api(api_key_path):
|
|
62 |
def read_models_csv(file_path):
|
63 |
# Reads a CSV file and returns a list of dictionaries
|
64 |
models = [] # Change {} to []
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
models.append(row) # Append to the list
|
70 |
return models
|
71 |
|
72 |
def csv_to_dict(file_path):
|
|
|
62 |
def read_models_csv(file_path):
|
63 |
# Reads a CSV file and returns a list of dictionaries
|
64 |
models = [] # Change {} to []
|
65 |
+
df = pd.read_csv(file_path)
|
66 |
+
for _, row in df.iterrows():
|
67 |
+
model_dict = row.to_dict()
|
68 |
+
models.append(model_dict)
|
|
|
69 |
return models
|
70 |
|
71 |
def csv_to_dict(file_path):
|