Spaces:
Runtime error
Runtime error
Commit
·
ee94261
1
Parent(s):
b27e072
Update app.py
Browse files
app.py
CHANGED
@@ -143,12 +143,10 @@ def append_file(file_path, content):
|
|
143 |
except:
|
144 |
return "Error occurred while appending to file."
|
145 |
|
146 |
-
def download_csv(file_path
|
147 |
try:
|
148 |
with open(file_path, "wb") as file:
|
149 |
writer = csv.writer(file)
|
150 |
-
writer.writerow(headers)
|
151 |
-
writer.writerows(data)
|
152 |
return f"Successfully downloaded {file_path}."
|
153 |
except:
|
154 |
return "Error occurred while downloading file."
|
|
|
143 |
except:
|
144 |
return "Error occurred while appending to file."
|
145 |
|
146 |
+
def download_csv(file_path):
|
147 |
try:
|
148 |
with open(file_path, "wb") as file:
|
149 |
writer = csv.writer(file)
|
|
|
|
|
150 |
return f"Successfully downloaded {file_path}."
|
151 |
except:
|
152 |
return "Error occurred while downloading file."
|