PeterKruger commited on
Commit
44fdf84
·
verified ·
1 Parent(s): 9e5f02a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -469,7 +469,6 @@ def get_answer_from_model(model_id, question, consecutive_failures, failure_thre
469
  time.sleep(time_sleep) # Small delay
470
  duration = time.time() - start_time # Calculate duration
471
  print(f"Answer generation by \"{model_id}\": {duration:.2f}s") # Print answer generation duration separately as requested - as requested
472
- st.write(f"Answer generation by \"{model_id}\": {duration:.2f}s") # Print answer generation duration separately as requested - as requested
473
 
474
  return answer, duration # Return answer and duration
475
 
@@ -684,6 +683,7 @@ def run_benchmark(hf_models, topics, difficulties, t, model_config, token=None):
684
  for future in concurrent.futures.as_completed(answer_futures):
685
  model_id = active_models[answer_futures.index(future)] # Get model_id based on future index (order is preserved)
686
  answer, duration = future.result() # Get both answer and duration - unpack the returned tuple
 
687
  answers[model_id] = answer
688
  answer_durations[model_id] = duration # Store duration - store the duration in the answer_durations dictionary
689
 
@@ -957,7 +957,7 @@ if st.sidebar.button("Start Benchmark"):
957
  # Run the benchmark
958
  try:
959
  # Update status
960
- status_text.text("Benchmark running...\n\nThis will take a few minutes depending on the number of models and iterations chosen. If you want to follow progress in the question-answer-ranking process per each iteration, check the container log (above, next to the \"running\" button).")
961
 
962
  # Run benchmark and get results
963
  results, cumulative_avg_rank, total_successful = run_benchmark(
 
469
  time.sleep(time_sleep) # Small delay
470
  duration = time.time() - start_time # Calculate duration
471
  print(f"Answer generation by \"{model_id}\": {duration:.2f}s") # Print answer generation duration separately as requested - as requested
 
472
 
473
  return answer, duration # Return answer and duration
474
 
 
683
  for future in concurrent.futures.as_completed(answer_futures):
684
  model_id = active_models[answer_futures.index(future)] # Get model_id based on future index (order is preserved)
685
  answer, duration = future.result() # Get both answer and duration - unpack the returned tuple
686
+ st.write(f"Answer generation by \"{model_id}\": {duration:.2f}s") # Print answer generation duration separately as requested - as requested
687
  answers[model_id] = answer
688
  answer_durations[model_id] = duration # Store duration - store the duration in the answer_durations dictionary
689
 
 
957
  # Run the benchmark
958
  try:
959
  # Update status
960
+ status_text.text("Benchmark running...\n\nFor more detailed logs, check the container log (above, next to the \"running\" button).")
961
 
962
  # Run benchmark and get results
963
  results, cumulative_avg_rank, total_successful = run_benchmark(