Skip to content

Commit 49bd022

Browse files
committed
Remove step 3 and copy output file in step 2
1 parent cfda63b commit 49bd022

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

launcher/app.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -547,19 +547,16 @@ def file_upload(label: str, extensions: list[str], key: str,
547547
st.error(f"Binary not found: `{opflow_bin}`")
548548
st.session_state.viz_opflow_output = None
549549

550-
if st.session_state.get("viz_opflow_output"):
551-
st.subheader("Step 3: Copy Output to Viz")
552-
# Find the JSON output file
553-
output_dir = cfg.get("output_dir", "")
554-
json_outputs = list(Path(output_dir).glob("*.json"))
555-
if json_outputs:
556-
latest_json = max(json_outputs, key=lambda p: p.stat().st_mtime)
557-
st.info(f"JSON output: `{latest_json.name}`")
558-
559-
if st.button("Copy to viz/data & Configure", key="viz_copy_btn"):
550+
if st.session_state.get("viz_opflow_output"):
551+
# Find the JSON output file
552+
output_dir = cfg.get("output_dir", "")
553+
json_outputs = list(Path(output_dir).glob("*.json"))
554+
if json_outputs:
555+
latest_json = max(json_outputs, key=lambda p: p.stat().st_mtime)
556+
st.info(f"JSON output: `{latest_json.name}`")
560557
shutil.copy(latest_json, viz_dir + "/data")
561-
else:
562-
st.warning("No JSON output found. Run OPFLOW first.")
558+
else:
559+
st.warning("No JSON output found. Run OPFLOW first.")
563560

564561
else:
565562
# Use existing JSON

0 commit comments

Comments
 (0)