app.py
CHANGED
@@ -141,13 +141,24 @@ st.write(mono)
|
|
141 |
#st.write(MessagePassingModel)
|
142 |
#st.write(test_weights)
|
143 |
#
|
|
|
|
|
144 |
|
145 |
from ase.visualize import view
|
146 |
-
display_mol = view(atoms+dcmol, viewer="x3d")
|
147 |
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
-
st.html(display_mol)
|
151 |
|
152 |
x = st.slider('Select a value')
|
153 |
st.write(x, 'squared is', x * x)
|
|
|
141 |
#st.write(MessagePassingModel)
|
142 |
#st.write(test_weights)
|
143 |
#
|
144 |
+
st.write(atoms)
|
145 |
+
st.write(dcmol)
|
146 |
|
147 |
from ase.visualize import view
|
|
|
148 |
|
149 |
+
try:
|
150 |
+
from StringIO import StringIO
|
151 |
+
except ImportError:
|
152 |
+
from io import StringIO
|
153 |
+
|
154 |
+
output = StringIO()
|
155 |
+
display_mol = (atoms+dcmol).write(output, format="html")
|
156 |
+
data = display_mol.getvalue()
|
157 |
+
|
158 |
+
st.write(type(data))
|
159 |
+
|
160 |
+
st.html(data)
|
161 |
|
|
|
162 |
|
163 |
x = st.slider('Select a value')
|
164 |
st.write(x, 'squared is', x * x)
|