zpbrent commited on
Commit
262bc4c
1 Parent(s): d9dba9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -1,4 +1,14 @@
1
  import streamlit as st
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ from streamlit.components.v1 import html
3
 
4
+ # Define your javascript
5
+ my_js = """
6
+ alert("Hola mundo");
7
+ """
8
+
9
+ # Wrapt the javascript as html code
10
+ my_html = f"<script>{my_js}</script>"
11
+
12
+ # Execute your app
13
+ st.title("Javascript example")
14
+ html(my_html)