Update app.py
Browse files
app.py
CHANGED
|
@@ -565,7 +565,7 @@ with main_block as demo:
|
|
| 565 |
|
| 566 |
|
| 567 |
def start_evaluation(command, jsonl_file, subset, split):
|
| 568 |
-
|
| 569 |
extra = subset + "_" if subset != "full" else ""
|
| 570 |
if jsonl_file is not None:
|
| 571 |
result_path = os.path.basename(jsonl_file.name).replace(".jsonl", f"_{extra}eval_results.json")
|
|
@@ -577,7 +577,7 @@ with main_block as demo:
|
|
| 577 |
yield log, gr.update(value=result_path, label=result_path, visible=True), gr.update(visible=False)
|
| 578 |
else:
|
| 579 |
yield log, gr.update(), gr.update()
|
| 580 |
-
|
| 581 |
result_file = find_result_file()
|
| 582 |
if result_file:
|
| 583 |
return gr.update(label="Evaluation completed. Result file found."), gr.update(value=result_file)
|
|
|
|
| 565 |
|
| 566 |
|
| 567 |
def start_evaluation(command, jsonl_file, subset, split):
|
| 568 |
+
lock.acquire()
|
| 569 |
extra = subset + "_" if subset != "full" else ""
|
| 570 |
if jsonl_file is not None:
|
| 571 |
result_path = os.path.basename(jsonl_file.name).replace(".jsonl", f"_{extra}eval_results.json")
|
|
|
|
| 577 |
yield log, gr.update(value=result_path, label=result_path, visible=True), gr.update(visible=False)
|
| 578 |
else:
|
| 579 |
yield log, gr.update(), gr.update()
|
| 580 |
+
lock.release()
|
| 581 |
result_file = find_result_file()
|
| 582 |
if result_file:
|
| 583 |
return gr.update(label="Evaluation completed. Result file found."), gr.update(value=result_file)
|