Spaces:
Runtime error
Runtime error
Commit ·
696e3bb
1
Parent(s): f80313a
changing file open mode from append ('a') to write ('w+')
Browse files- persistStorage.py +1 -1
persistStorage.py
CHANGED
|
@@ -19,7 +19,7 @@ fs = HfFileSystem(token=HUGGING_FACE_TOKEN)
|
|
| 19 |
def append_dict_to_csv(file_path, row_data):
|
| 20 |
fieldnames = row_data.keys()
|
| 21 |
|
| 22 |
-
with fs.open(file_path, '
|
| 23 |
csv_writer = csv.DictWriter(csv_file, fieldnames=fieldnames)
|
| 24 |
|
| 25 |
# Check if the file is empty, and if so, write the header
|
|
|
|
| 19 |
def append_dict_to_csv(file_path, row_data):
|
| 20 |
fieldnames = row_data.keys()
|
| 21 |
|
| 22 |
+
with fs.open(file_path, 'w+') as csv_file:
|
| 23 |
csv_writer = csv.DictWriter(csv_file, fieldnames=fieldnames)
|
| 24 |
|
| 25 |
# Check if the file is empty, and if so, write the header
|