Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Fix a bug with multiple file demo loaded and analyzed
Browse files
state.py
CHANGED
|
@@ -415,12 +415,17 @@ def run_analysis_loop(file_names, file_paths_dict, pipeline,
|
|
| 415 |
import utils as _utils
|
| 416 |
start_time = time.time()
|
| 417 |
|
| 418 |
-
# Only process files that haven't been analyzed yet
|
|
|
|
|
|
|
|
|
|
|
|
|
| 419 |
pending = [
|
| 420 |
fname for fname in file_names
|
| 421 |
if not (
|
| 422 |
fname in st.session_state.results
|
| 423 |
and len(st.session_state.results[fname]) == 2
|
|
|
|
| 424 |
)
|
| 425 |
]
|
| 426 |
|
|
|
|
| 415 |
import utils as _utils
|
| 416 |
start_time = time.time()
|
| 417 |
|
| 418 |
+
# Only process files that haven't been fully analyzed yet.
|
| 419 |
+
# A file is considered done only when both results AND summaries are
|
| 420 |
+
# populated — load_annotation_file sets results but not summaries, so
|
| 421 |
+
# demo/annotation-only files correctly appear in pending until analyze()
|
| 422 |
+
# has actually run.
|
| 423 |
pending = [
|
| 424 |
fname for fname in file_names
|
| 425 |
if not (
|
| 426 |
fname in st.session_state.results
|
| 427 |
and len(st.session_state.results[fname]) == 2
|
| 428 |
+
and st.session_state.summaries.get(fname, {}).get("speakers_dataFrame") is not None
|
| 429 |
)
|
| 430 |
]
|
| 431 |
|