Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,14 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|