heymenn commited on
Commit
8aa833d
1 Parent(s): dacc979

Update excel_chat.py

Browse files
Files changed (1) hide show
  1. excel_chat.py +2 -2
excel_chat.py CHANGED
@@ -220,7 +220,7 @@ def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col
220
  filtred_df = filter_df(df, search_col, keywords)
221
 
222
  cpt = 1
223
- checkpoint = 1
224
  for index, row in filtred_df.iterrows():
225
  concatenated_content = "\n\n".join(f"{column_name}: {str(row[column_name])}" for column_name in source_cols)
226
  if not concatenated_content == "\n\n".join(f"{column_name}: nan" for column_name in source_cols):
@@ -237,7 +237,7 @@ def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col
237
  try:
238
  if cpt == checkpoint:
239
  df.to_excel("checkpointfile.xlsx", index=False)
240
- checkpoint += 1
241
 
242
  except Exception as e:
243
  print(f"no checkpoint : {e}")
 
220
  filtred_df = filter_df(df, search_col, keywords)
221
 
222
  cpt = 1
223
+ checkpoint = 50
224
  for index, row in filtred_df.iterrows():
225
  concatenated_content = "\n\n".join(f"{column_name}: {str(row[column_name])}" for column_name in source_cols)
226
  if not concatenated_content == "\n\n".join(f"{column_name}: nan" for column_name in source_cols):
 
237
  try:
238
  if cpt == checkpoint:
239
  df.to_excel("checkpointfile.xlsx", index=False)
240
+ checkpoint += 50
241
 
242
  except Exception as e:
243
  print(f"no checkpoint : {e}")