XufengDuan commited on
Commit
2e0ca43
1 Parent(s): bb347af

update scripts

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. src/backend/model_operations.py +3 -3
app.py CHANGED
@@ -456,10 +456,10 @@ with demo:
456
  def background_init_and_process():
457
  global original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df
458
  original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = init_space()
459
- #process_pending_evals()
460
 
461
  scheduler = BackgroundScheduler()
462
  scheduler.add_job(background_init_and_process, 'date', run_date=datetime.datetime.now()) # 立即执行
463
- scheduler.add_job(restart_space, "interval", seconds=36000)
464
  scheduler.start()
465
  demo.queue(default_concurrency_limit=40).launch()
 
456
  def background_init_and_process():
457
  global original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df
458
  original_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = init_space()
459
+ process_pending_evals()
460
 
461
  scheduler = BackgroundScheduler()
462
  scheduler.add_job(background_init_and_process, 'date', run_date=datetime.datetime.now()) # 立即执行
463
+ scheduler.add_job(restart_space, "interval", seconds=1720000)
464
  scheduler.start()
465
  demo.queue(default_concurrency_limit=40).launch()
src/backend/model_operations.py CHANGED
@@ -179,7 +179,7 @@ class SummaryGenerator:
179
  if 'Stimuli-2' in df_sheet.columns:
180
  Stimuli_2_column = df_sheet["Stimuli-2"]
181
 
182
- for j, prompt_value in enumerate(tqdm(prompt_column, desc=f"Processing {sheet_name}"), start=0):
183
  if exit_outer_loop:
184
  break
185
  ID = 'E' + str(i)
@@ -235,7 +235,7 @@ class SummaryGenerator:
235
  if exit_outer_loop:
236
  break
237
  if i == 5:
238
- print(_response)
239
 
240
  def extract_responses(text, trigger_words=None):
241
  if trigger_words is None:
@@ -309,7 +309,7 @@ class SummaryGenerator:
309
  Stimuli_1.append(Stimuli_1_column[j])
310
  Item_ID.append(Item_column[j])
311
  Condition.append(Condition_column[j])
312
- print(_response)
313
 
314
 
315
  # exit()
 
179
  if 'Stimuli-2' in df_sheet.columns:
180
  Stimuli_2_column = df_sheet["Stimuli-2"]
181
 
182
+ for j, prompt_value in enumerate(tqdm(prompt_column[0:1], desc=f"Processing {sheet_name}"), start=0):
183
  if exit_outer_loop:
184
  break
185
  ID = 'E' + str(i)
 
235
  if exit_outer_loop:
236
  break
237
  if i == 5:
238
+ #print(_response)
239
 
240
  def extract_responses(text, trigger_words=None):
241
  if trigger_words is None:
 
309
  Stimuli_1.append(Stimuli_1_column[j])
310
  Item_ID.append(Item_column[j])
311
  Condition.append(Condition_column[j])
312
+ #print(_response)
313
 
314
 
315
  # exit()