Loading scratch 3 ml4k extension in local setup.

33 views
Skip to first unread message

Suhardi Hamid

unread,
May 10, 2025, 4:55:22 AMMay 10
to mlfo...@googlegroups.com
Hi all, I believe I have gotten ml4k set up in my local machine. I am also able to access ml4k-scratch from the same machine. However, I am unable to load the trained model into local scratch gui. Instead, I still have to access the site. Is there a way I can load the extension into the local scratch or perhaps add a feature to load any arbitrary extension like the sheeptester's version of scratch? Appreciate any comments. Thanks in advance.

Rgds
Suhardi 

Dale Lane

unread,
May 10, 2025, 4:59:25 AMMay 10
to Machine Learning for Kids
Try replacing these lines: 

with this:

const scratchlocation: string = path.join(__dirname, '/../../../../mlforkids-scratch/scratch3');
app.use('/scratch', compression(), express.static(scratchlocation, { maxAge : constants.FIVE_MINUTES }));


That should allow it to use your local Scratch build

Kind regards

D

Suhardi Hamid

unread,
May 11, 2025, 5:35:02 AMMay 11
to Machine Learning for Kids
Excellent! Dale, works like a charm.
You are a savior. Thank you very much!

regards,
Suhardi

Reply all
Reply to author
Forward
0 new messages