Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update state.py
Browse files
state.py
CHANGED
|
@@ -504,6 +504,7 @@ def load_demo_single(demo_path):
|
|
| 504 |
_remap_demo_labels(dname)
|
| 505 |
with st.spinner("Analyzing Demo Data"):
|
| 506 |
analyze(dname)
|
|
|
|
| 507 |
st.success(f"Took {time.time() - start_time:.1f}s to analyze the demo file!")
|
| 508 |
st.session_state.select_currFile = dname
|
| 509 |
return dname
|
|
@@ -614,6 +615,10 @@ def run_analysis_loop(file_names, file_paths_dict):
|
|
| 614 |
|
| 615 |
with st.spinner(f"Analyzing {i+1}/{totalFiles}"):
|
| 616 |
analyze(fname)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 617 |
|
| 618 |
# Return to cpu
|
| 619 |
pipeline.toCPU()
|
|
|
|
| 504 |
_remap_demo_labels(dname)
|
| 505 |
with st.spinner("Analyzing Demo Data"):
|
| 506 |
analyze(dname)
|
| 507 |
+
_setup_demo_roles_population(dname)
|
| 508 |
st.success(f"Took {time.time() - start_time:.1f}s to analyze the demo file!")
|
| 509 |
st.session_state.select_currFile = dname
|
| 510 |
return dname
|
|
|
|
| 615 |
|
| 616 |
with st.spinner(f"Analyzing {i+1}/{totalFiles}"):
|
| 617 |
analyze(fname)
|
| 618 |
+
# Auto-assign roles and population for demo files
|
| 619 |
+
plain = fname.rsplit(".", 1)[0].lower()
|
| 620 |
+
if plain.startswith("class") or fname.startswith("audioSamples/class"):
|
| 621 |
+
_setup_demo_roles_population(fname)
|
| 622 |
|
| 623 |
# Return to cpu
|
| 624 |
pipeline.toCPU()
|