Skip to content

Commit ae92a9a

Browse files
authoredJul 11, 2024
Update SpecNec_executable_streamlit.py
1 parent b4f12f8 commit ae92a9a

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
 

‎fun_SPEC_NEC/SpecNec_executable_streamlit.py

+44
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,52 @@
220220
st.pyplot(fig1)
221221

222222

223+
################################################ Results #################################################
224+
225+
# Lista de mensajes graciosos
226+
messages = [
227+
"Well, well, well... look who needed some results.",
228+
"Behold! The miraculous results you've been waiting for!",
229+
"Surprise! Here are your results. Try not to faint.",
230+
"Results are in. Try to act surprised.",
231+
"Ta-da! Your results, served with a side of irony.",
232+
"Eureka! Your results are here. Don't spend them all in one place.",
233+
"Drum roll, please... Your results have arrived.",
234+
"Breaking news! Your results are hot off the press.",
235+
"Hold onto your hat! Here are your sparkling new results.",
236+
"Voilà! Your results have magically appeared.",
237+
"No, I am not ChatGPT, don't insist. Wink wink."
238+
]
239+
# Lista de gif's
240+
gifs = [
241+
"https://media4.giphy.com/media/EbeeDkvlC3fFRGJ6Om/200.webp?cid=ecf05e47pr1lqu1ercua819ufpxbbjc92z3b6eerc825ilv1&ep=v1_gifs_search&rid=200.webp&ct=g",
242+
"https://media2.giphy.com/media/dXpAxrUk0Ya9TXBJH9/200.webp?cid=ecf05e47pr1lqu1ercua819ufpxbbjc92z3b6eerc825ilv1&ep=v1_gifs_search&rid=200.webp&ct=g",
243+
"https://media0.giphy.com/media/wzu3RR6iZGD7ryCFdm/200.webp?cid=ecf05e472d4zjoh9xvy2h63ugepvflgkoseft7fe2rjdcs7a&ep=v1_gifs_search&rid=200.webp&ct=g",
244+
"https://media1.giphy.com/media/XreQmk7ETCak0/200.webp?cid=ecf05e478au4hlrh86lo1v25qxz7hrz7qkubs967m720usle&ep=v1_gifs_search&rid=200.webp&ct=g",
245+
"https://media1.giphy.com/media/xUPGcmvgjMIEhy6jZu/200.webp?cid=ecf05e474k63y0j7jtbydaaikmvhrfsz8bcdlzji0u0jr385&ep=v1_gifs_search&rid=200.webp&ct=g",
246+
"https://media4.giphy.com/media/JliGmPEIgzGLe/200.webp?cid=ecf05e474k63y0j7jtbydaaikmvhrfsz8bcdlzji0u0jr385&ep=v1_gifs_search&rid=200.webp&ct=g",
247+
"https://media3.giphy.com/media/l3fZXTZdS6Ofi7U6A/100.webp?cid=ecf05e47rwnp5i6yc3odmtob7g480qqlo56d0pugbbtroo7q&ep=v1_gifs_search&rid=100.webp&ct=g",
248+
"https://media1.giphy.com/media/3oswhordgO0ZbDkTio/200.webp?cid=ecf05e472vc7m7m1ngpi9rkt38gk6200t3c5ov68mq6nauuh&ep=v1_gifs_search&rid=200.webp&ct=g",
249+
"https://media0.giphy.com/media/xTdy8lYBh2XGvzz5UA/200.webp?cid=ecf05e472vc7m7m1ngpi9rkt38gk6200t3c5ov68mq6nauuh&ep=v1_gifs_search&rid=200.webp&ct=g",
250+
"https://media2.giphy.com/media/l0MYuPnFNsKteNw1a/200.webp?cid=ecf05e471izn0s02usul3fv0scf9mtjmghbsryi3rsbufpcd&ep=v1_gifs_search&rid=200.webp&ct=g",
251+
"https://media0.giphy.com/media/Dh5q0sShxgp13DwrvG/200.webp?cid=790b7611oiq55hr7mtdyx682bu69e8tfe4597zdp56l1ezeu&ep=v1_gifs_search&rid=200.webp&ct=g",
252+
"https://media2.giphy.com/media/EHxx63vDG0jQ8bKIkP/200.webp?cid=ecf05e470cgg4omlys19jn9w0dv38kqrz7wlbjpyg8f83kn7&ep=v1_gifs_search&rid=200.webp&ct=g",
253+
"https://media0.giphy.com/media/26gJAkoJKPKoFH7DW/200.webp?cid=ecf05e4712aizlynkwpnfsfwaf5aboy7qf6aacbaodjfso58&ep=v1_gifs_search&rid=200.webp&ct=g"
254+
]
255+
256+
# Seleccionar un mensaje al azar
257+
random_message = np.random.choice(messages)
258+
random_gif = np.random.choice(gifs)
259+
223260
st.markdown('##### 📊 **Response Spectra [Elastic and Inelastic]**')
224261

262+
col1, col2 = st.columns([1, 3])
263+
with col1:
264+
st.image(random_gif, use_column_width=True)
265+
with col2:
266+
with st.chat_message("assistant"):
267+
st.write(random_message)
268+
225269
o1, o2 = st.columns([1,2])
226270
with o1:
227271
st.metric(label='Max Sae', value=f"{np.max(Sae):.4f}", delta='g')

0 commit comments

Comments
 (0)