Blockly for Machine Learning

870 views
Skip to first unread message

Adarsh C

unread,
Dec 15, 2021, 12:16:26 PM12/15/21
to Blockly
Hello Team,

I recently developed a very simple Blockly web app, served with python flask. I created extra blocks for ML Regressors and Classifiers, along with support for pandas DataFrame and dictionary. You can download it as an app and run it on Docker or run it as a flask app.

This is a good tool for people with coding experience who wants to do a fast switch to python and subsequently to Machine Learning. (I am yet to do the work for deep learning on this).

Please have a look at the work and demo given below. Looking forward to the support and feedback from this warm community.

Demo: https://blocklyml.herokuapp.com/  (If u get Application Error, please reload it!! it's on the free tier)


IrisRandomForest.png

Adarsh C

unread,
Dec 15, 2021, 6:30:45 PM12/15/21
to Blockly
PS: Don't forget to Star it if you like it!!

Beka Westberg

unread,
Dec 16, 2021, 9:24:06 AM12/16/21
to blo...@googlegroups.com
Hello!

Thanks for posting this, it looks awesome! I don't know anything about machine learning, so I can't really comment on that haha, but I love your use of Blockly! It is so cool to see someone using the dark theme, it looks rad =) What made you choose it over the default?

I also really like how you've set connection checks on your blocks. A lot of projects forget to do it, but I think it makes learning to program so much more intuitive. Why allow type errors when  you could just get rid of them entirely? :D

Thank you again for sharing! I can't wait to see what you do next =)
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/6e61f4c7-a0ed-443b-8de6-146a1b611efen%40googlegroups.com.

Jonty Small

unread,
Dec 16, 2021, 11:01:25 AM12/16/21
to Blockly
Hi,

This looks cool, I always find that most ML work is super structured though. Might be helpful to have some predefined block combinations. Or have a start block that loads in data, performs train test split etc.

I copy pasted my replication of your code into codelab and it errored out. Issue with random forest_ml being an int? for some reason its inserting an randomForest_ML=0 after the training.

That would also be another thing i would say. Try to make a "train model" block that creates a variable for a trained model. and a function that is "test model" that generates your output.

Basically. Avoid letting people use variables as much as possible. In our tool we only use variables as an alternative to magic numbers. I think its more intuitive for users.

ml.PNG

Thats a lot of nitpicks but in general i really like what you're doing! I think there is a big use case for this.

Deep learning would be super cool. I would recommend building some form of function system for defining the DL model. (I think you could "technically" build a multi layered perceptron using the basic blockly features. My secret dream is that someone actually tries that one day). So again nice helper blocks will be key here!

Best,
Jonty

Adarsh C

unread,
Dec 20, 2021, 8:34:50 PM12/20/21
to Blockly

Hello Beka,

I liked the dark theme because I like it better :D and generally, it's good for the eyes!!

Thank you for the support on my earlier quires, you guys are doing a great job keep it up!! 

My next goal will be to introduce visualization and other useful ML features I think!!

Adarsh C

unread,
Dec 20, 2021, 9:32:06 PM12/20/21
to Blockly
Hello Jonty,

Thank you for trying it out!!

Thanks for the feedback!!, I will look into the bug right now and Thanks for the feedback, I will make some pre-combined/ structured blocks I think that will be very much helpful!! Thanks.

If you like my work please star my repo, that's what keeps me motivated!!

Thank you
-Adarsh

6049 Jabilo Jose J

unread,
Oct 19, 2022, 6:16:27 AM10/19/22
to Blockly
is there a way to compile the python code in the browser itself instead of copy-pasting it in google collab ? 

ewpa...@gmail.com

unread,
Oct 19, 2022, 6:46:03 PM10/19/22
to Blockly
It doesn't seem like there is an official Google Colab API at this point, but this StackOverflow post hints at some options: https://stackoverflow.com/questions/50595831/google-colab-api

Cheers,
Evan
Reply all
Reply to author
Forward
0 new messages