I am new to Panel, and really don’t have much experience with front-end web development, so the example I created was very rudimentary. Two main things that I’d like to add to my script would be:
Additional sliders for more hyperparameters.
A dedicated train button that trains the model when pressed - I believe rn all models are trained at once.
If any of you have any good suggestions on how to accomplish that within the example above, I’d greatly appreciate it.
Interesting, that visiting the website, I get the following error:
PythonError: Traceback (most recent call last): File "/lib/python3.10/asyncio/futures.py", line 201, in result raise self._exception File "/lib/python3.10/asyncio/tasks.py", line 232, in __step result = coro.send(None) File "/lib/python3.10/site-packages/_pyodide/_base.py", line 506, in eval_code_async await CodeRunner( File "/lib/python3.10/site-packages/_pyodide/_base.py", line 357, in run_async coroutine = eval(self.code, globals, locals) File "", line 1, in ModuleNotFoundError: No module named 'panel'
Thanks @philippjfr so much for your help! I have been able to implement all of your suggestions from above, and the site (www.trainxgb.com) works as well (minus some style issues! )
However, I am now getting the following error messages. They don’t affect the functionality, but are annoying nonetheless.
WARNING:param.Row00145: Displaying Panel objects in the notebook requires the panel extension to be loaded. Ensure you run pn.extension() before displaying objects in the notebook.
PythonError: Traceback (most recent call last): File "", line 154, in write File "", line 82, in format_mime TypeError: argument of type 'NoneType' is not iterable
/lib/python3.10/site-packages/pyodide/__init__.py:74: FutureWarning: pyodide.create_proxy has been moved to pyodide.ffi.create_proxy Accessing it through the pyodide module is deprecated. warn(
/lib/python3.10/site-packages/pyodide/__init__.py:74: FutureWarning: pyodide.to_js has been moved to pyodide.ffi.to_js Accessing it through the pyodide module is deprecated. warn(
@tunguz Now that Panel 0.14.0 is released I’d recommend you just drop the app in a .py file and run:
panel convert script.py --runtime pyodide-worker --out out
Then copy the contents of out to your website. If you want to preserve readability of the HTML file you can also use --runtime pyscript and not configure a template.