Spaces:
Running
Running
Download index.html from bmarlin96/test_642_class: direct link, hf CLI and curl.
- Browser
- Download file 915 Bytes
-
https://huggingface.co/spaces/bmarlin96/test_642_class/resolve/main/index.html
- Command line
-
hf download hf://spaces/bmarlin96/test_642_class/index.html
-
curl -L -o index.html https://huggingface.co/spaces/bmarlin96/test_642_class/resolve/main/index.html
915 Bytes
| <html> | |
| <head> | |
| <script type="module" src="https://cdn.jsdelivr.net/npm/@pyscript/core@0.7.31/dist/core.js"></script> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@pyscript/core@0.7.31/dist/core.css"> | |
| </head> | |
| <body style="font-family: sans-serif; margin: 2em;"> | |
| <h2>Meridian inbox router</h2> | |
| <input id="msg" size="60" placeholder="Type a message"> | |
| <button py-click="route">Route</button> | |
| <p id="out"></p> | |
| <p id="ver"></p> | |
| <script type="py"> | |
| import sys | |
| from pyscript import document | |
| document.querySelector("#ver").innerText = "Running Python " + sys.version.split()[0] + " in your browser" | |
| def route(event): | |
| m = document.querySelector("#msg").value.lower() | |
| if "invoice" in m or "payment" in m: | |
| label = "billing" | |
| elif "recall" in m: | |
| label = "recall" | |
| else: | |
| label = "other" | |
| document.querySelector("#out").innerText = "Label: " + label | |
| </script> | |
| </body> | |
| </html> |