manabb commited on
Commit
3b4f8db
·
verified ·
1 Parent(s): fdfb395

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -147,6 +147,7 @@ def loop_function(df):
147
  E_file_No=""
148
  Name_of_proposal=""
149
  PR_no=""
 
150
  for index, row in df.iterrows():
151
  key = str(row['Field'])
152
  value = str(row['Value'])
@@ -195,7 +196,8 @@ def loop_function(df):
195
  if i == 1:
196
  try:
197
  rr = generate_response(manual_rules, proposal_details)
198
- update_log("\n"+datetime.now().isoformat()+"\n"+E_file_No+"\n"+rr)
 
199
  text += """
200
  <div style="color: white !important; background: #006400 !important; padding: 10px; font-size: 14px;">
201
 
@@ -212,6 +214,10 @@ def loop_function(df):
212
  except Exception as e:
213
  print(f"Error: {e} - skipping row")
214
  continue
 
 
 
 
215
  def loop_function_tech(df):
216
  #to be prepared
217
  yield "coming soon"
 
147
  E_file_No=""
148
  Name_of_proposal=""
149
  PR_no=""
150
+ txt_forRecord=""
151
  for index, row in df.iterrows():
152
  key = str(row['Field'])
153
  value = str(row['Value'])
 
196
  if i == 1:
197
  try:
198
  rr = generate_response(manual_rules, proposal_details)
199
+ txt_forRecord+="\n"+datetime.now().isoformat()+"\n"+E_file_No+"\n"+rr
200
+ #update_log("\n"+datetime.now().isoformat()+"\n"+E_file_No+"\n"+rr)
201
  text += """
202
  <div style="color: white !important; background: #006400 !important; padding: 10px; font-size: 14px;">
203
 
 
214
  except Exception as e:
215
  print(f"Error: {e} - skipping row")
216
  continue
217
+ try:
218
+ update_log("\n"+txt_forRecord+"\n")
219
+ except Exception as ee:
220
+ print(f"Error: {ee} - not saved the log")
221
  def loop_function_tech(df):
222
  #to be prepared
223
  yield "coming soon"