[[fetch]]
files = ['main.py']
from pyscript import when, display, document
from main import generate_password
@when("click", "#clear-btn")
def clear_all(event):
document.getElementById("main-input").value = ""
document.getElementById("result").innerHTML = ""
@when("click", "#show-btn")
def click_handler(event):
length = document.getElementById("main-input").value
result = generate_password(length)
document.getElementById("result").innerHTML = result