Skip to content

Commit c4ed2b7

Browse files
authored
Update st_trans.py
1 parent 2b1232f commit c4ed2b7

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

st_trans.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
1111
from pymatgen.io.cif import CifWriter
1212
import py3Dmol
13-
import streamlit.components.v1 as components
1413
import pandas as pd
1514
from mp_api.client import MPRester
1615
import spglib
@@ -269,7 +268,7 @@ def display_multi_run_results(all_results=None, download_format="CIF"):
269268

270269
if results_data:
271270
results_df = pd.DataFrame(results_data)
272-
st.dataframe(results_df, use_container_width=True)
271+
st.dataframe(results_df, width='stretch')
273272

274273
if valid_results:
275274
best_result = min(valid_results, key=lambda x: x['best_score'])
@@ -412,7 +411,7 @@ def display_multi_run_results(all_results=None, download_format="CIF"):
412411
"Fraction": f"{actual_frac:.4f}"
413412
})
414413
comp_df = pd.DataFrame(comp_data)
415-
st.dataframe(comp_df, use_container_width=True)
414+
st.dataframe(comp_df, width='stretch')
416415

417416
with col_info2:
418417
st.write("**Lattice Parameters:**")
@@ -429,7 +428,6 @@ def display_multi_run_results(all_results=None, download_format="CIF"):
429428
try:
430429
from io import StringIO
431430
import py3Dmol
432-
import streamlit.components.v1 as components
433431
from pymatgen.io.ase import AseAtomsAdaptor
434432
from ase.io import write
435433
import numpy as np
@@ -582,7 +580,7 @@ def add_box(view, cell, color='black', linewidth=2):
582580
view.zoom(1.2)
583581

584582
html_string = view._make_html()
585-
components.html(html_string, height=420, width=620)
583+
st.iframe(html_string, height=420, width=620)
586584

587585
unique_elements = sorted(set(structure_ase.get_chemical_symbols()))
588586
legend_html = "<div style='display: flex; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 10px;'>"
@@ -703,7 +701,7 @@ def render_sqs_module():
703701
padding: 4px 8px;
704702
border-radius: 12px;
705703
">
706-
v0.7.02/11/2026
704+
v0.7.14/11/2026
707705
</span>
708706
</h1>
709707
<h3 style='text-align: left; color: #444444; font-weight: normal;'>
@@ -1730,7 +1728,7 @@ def multiply_mineral_formula_by_2(formula_input):
17301728

17311729
# with cols2:
17321730
# image = Image.open("images/Rabbit2.png")
1733-
# st.image(image, use_container_width=True)
1731+
# st.image(image, width='stretch')
17341732

17351733
with cols3:
17361734
if any(x in st.session_state for x in ['mp_options', 'aflow_options', 'cod_options', 'mc3d_options']):

0 commit comments

Comments
 (0)