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