umuth commited on
Commit
94bdf43
·
verified ·
1 Parent(s): 185d2d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -182,9 +182,10 @@ def save_csv(*args):
182
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
183
  csv_filename = f'edited_metadata_{timestamp}.csv'
184
  df.to_csv(csv_filename, index=False)
185
- return csv_filename # Return CSV path for download
186
  except Exception as e:
187
- return f"Error saving data: {e}"
 
188
 
189
 
190
  # Functions to update character and keyword counts
 
182
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
183
  csv_filename = f'edited_metadata_{timestamp}.csv'
184
  df.to_csv(csv_filename, index=False)
185
+ return csv_filename, f"Data saved successfully to '{csv_filename}'!" # Return both the file path and success message
186
  except Exception as e:
187
+ return None, f"Error saving data: {e}" # Return None for the file path and an error message
188
+
189
 
190
 
191
  # Functions to update character and keyword counts