ManasSharma07 commited on
Commit
53d2333
·
verified ·
1 Parent(s): c355b9b

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +11 -6
src/streamlit_app.py CHANGED
@@ -1317,13 +1317,18 @@ if atoms is not None:
1317
 
1318
  st.markdown("### Optimization Trajectory")
1319
  st.write(f"Captured {len(trajectory)} optimization steps")
 
 
 
 
 
 
 
 
 
 
 
1320
 
1321
- st.download_button(
1322
- label="Download Optimization Trajectory (XYZ)",
1323
- data=trajectory_xyz,
1324
- file_name="optimization_trajectory.xyz",
1325
- mime="chemical/x-xyz"
1326
- )
1327
 
1328
  except Exception as e:
1329
  st.warning(f"Could not process trajectory: {e}")
 
1317
 
1318
  st.markdown("### Optimization Trajectory")
1319
  st.write(f"Captured {len(trajectory)} optimization steps")
1320
+ @st.fragment
1321
+ def show_trajectory_download_button():
1322
+ # st.button("Release the balloons", help="Fragment rerun")
1323
+ # st.balloons()
1324
+ st.download_button(
1325
+ label="Download Optimization Trajectory (XYZ)",
1326
+ data=trajectory_xyz,
1327
+ file_name="optimization_trajectory.xyz",
1328
+ mime="chemical/x-xyz"
1329
+ )
1330
+ show_trajectory_download_button()
1331
 
 
 
 
 
 
 
1332
 
1333
  except Exception as e:
1334
  st.warning(f"Could not process trajectory: {e}")