-
Hi everyone! I'm very new to mesa and I'm still trying to find my way. I'm running an example from the docs on a online host. The server starts but the resources are being loaded from wrong addresses, so i'm getting a bunch of "Failed to load resource" for all CSS and JS files. You can see it yourself in the console: https://huggingface.co/spaces/cakiki/mesa The code I'm running is here: https://huggingface.co/spaces/cakiki/mesa/blob/main/app.py |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This is where the JS files can be accessed, e.g. https://hf.space/embed/cakiki/mesa/static/js/GridDraw.js. But huggingface.co assumes it is https://hf.space/static/js/GridDraw.js. If you want to make it work on huggingface.co, you have to fork Mesa, and in https://github.com/projectmesa/mesa/blob/main/mesa/visualization/templates/modular_template.html, change the |
Beta Was this translation helpful? Give feedback.
This is where the JS files can be accessed, e.g. https://hf.space/embed/cakiki/mesa/static/js/GridDraw.js. But huggingface.co assumes it is https://hf.space/static/js/GridDraw.js. If you want to make it work on huggingface.co, you have to fork Mesa, and in https://github.com/projectmesa/mesa/blob/main/mesa/visualization/templates/modular_template.html, change the
/static/...
with absolute pathhttps://hf.space/embed/cakiki/mesa/static/...
.