Spaces:
Runtime error
Runtime error
Update app.py
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657import streamlit as stimport streamlit.components.v1 as components# Title of the Streamlit appst.title("Simple Streamlit App with HTML, CSS, and JavaScript")# HTML, CSS, and JavaScript contenthtml_code = """<!DOCTYPE html><html><head><style>/* CSS for styling */body {font-family: Arial, sans-serif;margin: 0;padding: 0;background-color: #f0f0f0;}h1 {color: #4CAF50;text-align: center;}.button {display: block;width: 200px;margin: 20px auto;padding: 10px 20px;text-align: center;color: white;background-color: #4CAF50;border: none;border-radius: 5px;cursor: pointer;}.button:hover {background-color: #45a049;}</style></head><body><h1>Welcome to My Streamlit App!</h1><button class="button" onclick="displayMessage()">Click Me</button><p id="message" style="text-align: center;"></p><script>// JavaScript for interactivityfunction displayMessage() {document.getElementById("message").innerHTML = "You clicked the button!";}</script></body></html>"""# Embed HTML, CSS, and JS in the Streamlit appcomponents.html(html_code, height=400)
app.py+57