Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -702,7 +702,9 @@ with gr.Blocks() as interface:
|
|
| 702 |
pass
|
| 703 |
active_processes = []
|
| 704 |
|
| 705 |
-
|
|
|
|
|
|
|
| 706 |
def threaded_batch_runner(file=None, text="", email=""):
|
| 707 |
print("clean everything remain before running")
|
| 708 |
cleanup_processes()
|
|
@@ -985,7 +987,8 @@ with gr.Blocks() as interface:
|
|
| 985 |
|
| 986 |
# Run summarize_results in a separate process with stop flag support
|
| 987 |
success, rows = run_with_timeout(
|
| 988 |
-
summarize_results,
|
|
|
|
| 989 |
args=(acc,),
|
| 990 |
timeout=None, # or set max seconds per sample if you want
|
| 991 |
stop_value=global_stop_flag
|
|
|
|
| 702 |
pass
|
| 703 |
active_processes = []
|
| 704 |
|
| 705 |
+
def summarize_results_sync(acc, stop_flag=None):
|
| 706 |
+
return asyncio.run(summarize_results(acc, stop_flag))
|
| 707 |
+
|
| 708 |
def threaded_batch_runner(file=None, text="", email=""):
|
| 709 |
print("clean everything remain before running")
|
| 710 |
cleanup_processes()
|
|
|
|
| 987 |
|
| 988 |
# Run summarize_results in a separate process with stop flag support
|
| 989 |
success, rows = run_with_timeout(
|
| 990 |
+
#summarize_results,
|
| 991 |
+
summarize_results_sync,
|
| 992 |
args=(acc,),
|
| 993 |
timeout=None, # or set max seconds per sample if you want
|
| 994 |
stop_value=global_stop_flag
|