#Neuro's Canvas (Neuro Integration for a Simple Painting App)

1 messages · Page 1 of 1 (latest)

elfin shuttle
#

This is a simple painting app I created in Python to allow Neuro to make some doodles.

Everything is in this repository, no separate installs required:
https://github.com/Kaya-Kaya/neuro-canvas

The app has a limited set of options right now. I'm open to suggestions for improvements, and you're also welcome to pull request any changes you wish to see!

GitHub

A painting app that lets Neuro draw! Contribute to Kaya-Kaya/neuro-canvas development by creating an account on GitHub.

#

A demo of Jippity attempting to draw a turtle

bitter skiff
#

Could be cool to see her try and draw, ofc with her controlling it and not just another ai doing everything.

celest bay
#

I don't know how crazy would go if neuro could grab the pencil and say "line from coordinate to coordinate". Maybe it's way too advanced scrajj

elfin shuttle
low cosmos
#

Could she draw curves properly by expressing it mathematically in her head and then drawing the function graph?

#

Far from true hand-drawn but it's something

celest bay
low cosmos
celest bay
elfin shuttle
elfin shuttle
elfin shuttle
#

Here's Jippity using only the curves feature. It said it was making a landscape. From what I can tell it doesn't have a super good understanding of the result of its actions for this one as compared to the other simpler tools, and prefers to use the minimum number of points

celest bay
#

But that already feels more natural. It's progress

dusty solar
#

ah yes, the new form of ai art

dusty solar
dusty solar
#

@elfin shuttle sorry for ping, I just pushed the changes you asked for + a readme change and requested your review, could you take a look at it when you can?

#

also what are you working on adding? planning on more contributions after this so I need to know if you are working on stuff so I don't overlap

elfin shuttle
dusty solar
dusty solar
dusty solar
#

@elfin shuttle maybe do feature releases in batches because I'll be PRing these in slowly

timber thorn
#

Can the AI write a math formula to create a specific line like a graph?

elfin shuttle
jagged trench
#

I know it somewhat kills the idea of fully sketching, but at least it is an easier option for shapes. Plus the lines already contain the same math for drawing them.

dusty solar
#

I may have almost lost the sheet of paper that my friend gave me

elfin shuttle
jagged trench
#

As a side note, if anyone hasn't tried manually creating SVG files, I'd say it is worth your time. It is not as daunting as one may think.

elfin shuttle
elfin shuttle
jagged trench
jagged trench
elfin shuttle
#

That is a feature I want to work on soon

jagged trench
#

I hope that it is very easy for you to accomplish!

dry locust
#

evilLurk very cool project

dusty solar
#

oh shoot I never PR'd in layers

dusty solar
#

@elfin shuttle I forgot to ask you to check my PR changes, I'll just ping you for that since this feels like a month overdue?

dusty solar
#

@elfin shuttle can't add @update_display to layer vis & remove actions in canvas since they aren't defined/imported

elfin shuttle
dusty solar
#

oh it's cause it's before the decorator

#

lemme fix that rq

dusty solar
#

@elfin shuttle dooooonnnneeeeee

#

sorry for the delays

elfin shuttle
elfin shuttle
elfin shuttle
#

@dusty solar I've figured out how to make undos work with layers (and hopefully more features in the future). It involves some big changes to the canvas script, wanted to check if you were working on anything before I push

dusty solar
dusty solar
#

hey @elfin shuttle how much are you going to keep this to "simple"? As in, what's the limit on the extensiveness of this building app?

because I might start using the little-known app called "paint" as my reference point

#

goddamn it i should've named the branch i-spilled-the-bucket

elfin shuttle
#

i might split up the actions script into multiple files if we're planning a lot of different actions

dusty solar
#

share probs will also be gone for obvious reasons

dusty solar
#

cool

#

I will probably get started on branches today buuut I had my blood drawn yesterday and it still is somehow hurting so we'll see how I go

#

I think you already have the save action right?

elfin shuttle
#

yea

dusty solar
#

does it let you save as any other file format?

elfin shuttle
#

not currently but it would be easy to implement

#

it should probably be a config option and not something that neuro controls tho

dusty solar
#

ehhhh I disagree? at least making it as like

#

list of allowed options

#

because i'm not sure if it will always be good to save as one file type

elfin shuttle
#

actually ive been thinking about making what actions are available to neuro configurable, ig i could do it so that you can specify which options neuro will have

dusty solar
#

right, so like permissions neuroDespair

elfin shuttle
#

yeah pretty much

dusty solar
#

cool

elfin shuttle
#

in case she overuses something it might be nice to have

dusty solar
#

I can see if I can work on that? probably will make it a separate file like permissions.py

#

and then would a config.json work as well?

elfin shuttle
#

yeah that works

dusty solar
#

alright

#

hm actually I might combine the logic for both into config_reader.py

elfin shuttle
#

like the saved configurations would still be in config.json?

dusty solar
#

yes

#

I might make it json5 or yaml instead but if those don't work out (and I'm certain they probably won't) I will just default back to json

elfin shuttle
#

not familiar with those but whatever format you prefer is fine

dusty solar
#

ok

#

would it also be alright to

#

switch to using uv for package management

#

as well

elfin shuttle
#

ive never used it

#

whats the advantage

dusty solar
#

it's a package manager written in rust (lol ofc it is)

#

but like it's really fast and also just really nice
also has a lockfile (the best part for me)

#

I don't remember what else it has

#

since that's all I remember off the top of my head

elfin shuttle
#

alr im gonna look into it

#

is there anything that would need to change in the repo

dusty solar
#

no

#

in fact the only thing changing is adding a new uv.lock file

jagged trench
#

I do prefer uv, but that's just because it is a one line change in my env file for very fast venv activation.

dusty solar
#

wait what do you need to change in your env file

jagged trench
#

I blame Nix for all of my issues

#

but yeah, at least for what I use activating it is an extra line

dusty solar
#

ah

#

nix is weird

elfin shuttle
#

@dusty solar ive split up the actions script so having a lot of actions should be easier to manage now, hopefully i didnt create any merge conflicts

dusty solar
#

config.json will be split between 2 top-level keys: settings and permissions

#

@elfin shuttle Would it perhaps be a good idea to build a separate GUI for toggling permissions and settings and such?

#

or do we just leave it as json-only

elfin shuttle
dusty solar
#

I'll get config.json working first ofc

elfin shuttle
#

we'll see how difficult it ends up being manually editing the json

#

added other filetypes to saving btw

dusty solar
#

Hey @elfin shuttle is this a good structure for the config.json file?

{
    "configVersion": 1,
    "settings": {
        "allowed_save_file_formats": ["png", "jpg"],
        "canvas_size": {
            "height": 1920,
            "weight": 1080
        }
    },
    "permisssions": {}
}
elfin shuttle
#

if so then looks good

dusty solar
#

🔥

dusty solar
#

@elfin shuttle what file formats does the app officially support?

dusty solar
#

cool

dusty solar
elfin shuttle
dusty solar
elfin shuttle
#

i was thinking we wouldnt register actions that dont have permissions in the first place

#

so in the __init__.py in actions

#

also can you add fine-grained (per action) permissions as well? i thought you were just asking about how the json should be organized, i didnt realize you were doing permissions by groups of actions

elfin shuttle
#

fyi i wont be able to respond on discord next week and a half or so, message me on github instead

dusty solar
dusty solar
elfin shuttle
#

and add what condition you need to check

elfin shuttle
#

same with misc

dusty solar
#

hm

#

alr

elfin shuttle
#

i can add them after merging if you'd prefer not to work on that part

dusty solar
#

I'll see if I can work on it

dusty solar
elfin shuttle
dusty solar
elfin shuttle
dusty solar
#

@elfin shuttle I defo did not forget about ths

elfin shuttle
wraith cliff
modern plume
#

this seems cool

distant barn
#

Why not make the canvas an coordinate system and neuro could draw on individual pixels.

elfin shuttle
#

also the canvas is a coordinate system, but it's edited using actions like draw line, draw circle, etc. as opposed to individual pixels

timber thorn
#

If she can draw a line from x,y to x,y then she could probably draw tiny dots if she wanted.

elfin shuttle
timber thorn
elfin shuttle
distant barn
distant barn
elfin shuttle
distant barn
#

Pixel map?

distant barn
elfin shuttle
distant barn
#

True.

#

Idk

elfin shuttle
#

i think its a good idea for pixel art though

distant barn
#

Kinda yeah

#

I do have an idea for image drawing from math

#

Idk if neuro could do math that well or not. I saw a video about someone who used math to make art.

elfin shuttle
#

especially if using a common format like latex

#

i have no idea how i would program it though

distant barn
#

I could help

#

How is neuro seeing the canvas currently?

elfin shuttle
#

she's not, the idea is that she would have vision enabled although even if it wasn't she can figure out what's on the canvas by what actions she's performed

#

the challenge with drawing from math is parsing the latex or whatever format and performing calculations which idk how to do

distant barn
distant barn
elfin shuttle
distant barn
#

Nevermind. Im too stupid to explain. Sorry, i can help with parsing the math input from neuro onto a graph as an image

elfin shuttle
distant barn
#

Okay

dusty solar
#

@elfin shuttle resolved conflicts on my config.json pr

dusty solar
#

just realised CI failed on that branch neurOMEGALUL

#

idk why tho lemme see

#

considering that code shouldn't have had tests written for it

elfin shuttle
dusty solar
#

...

#

oops

#

ill do that tmrw when im free (im tired and need to write smth)

elfin shuttle
dusty solar
#

cool

timber thorn
timber thorn
honest terrace
#

This is cool. Need to read through how this was done later neuroHypers

dusty solar
#

Sorry y'all

timber thorn
#

How different is this from turtle?

dusty solar
#

well for one all the bindings are directly as an action instead of having to script them all

timber thorn
#

Sorry for my ignorance, but is this a library that could work along turtle? Or they use completely different canvases?

dusty solar
#

They would use completely different canvas iirc

timber thorn
#

Oh that's right, those are their own integration functions and app, not a library.
I guess dynamically drawing has its own use though.

#

I wonder if it's possible to add other drawing libraries to this and let her write small scripts.

dusty solar
#

and if we want to make it so that she can use any library and she just has to script it then that sounds... awfully familiar NeuroClueless

timber thorn
#

Just the idea of her using different ways to draw on the same canvas and the ability for her to save the image and/or restart it.

#

Although, the problem in general with the concept of her drawing in steps is her knowing what she just draw.

dusty solar
dusty solar
timber thorn
# dusty solar saving is already a thing, and idk what you mean by different ways also wdym by...

Like, I'm saying this without really anything in mind, but I was thinking that basically, instead of each time creating a new image every time she can decide to continue on the same image, save the current image and/or restarting from blank.
She could use any library, function or action she wanted, existing or made by us.
I think for this to exist you'd have to either:

  • make an app or library that let's you(neuropilot) draw in steps on top of the existing canvas without erasing and then you could create any custom function you want if they don't exist already
  • or more wackily an entire app with these same features, script parsing, custom commands, etc...

Idk if I made sense.

dusty solar
# timber thorn Like, I'm saying this without really anything in mind, but I was thinking that b...

[..] I was thinking that basically, instead of each time creating a new image every time she can decide to continue on the same image, save the current image and/or restarting from blank.

Currently not very possible unless we define our own image file format (like photoshop or gimp)
Unless you mean that she can just load an image and add her drawings on it, similar to downloading an image from google and making edits (might work)

She could use any library, function or action she wanted, existing or made by us.

see above, this also means the canvas app has to be pluggable which sort of breaks the part where this is supposed to be a simple drawing app
although we probably could drop the "simple" pretense...

I think for this to exist you'd have to either make an app or library that let's you(neuropilot) draw in steps on top of the existing canvas without erasing and then you could create any custom function you want if they don't exist already, or more wackily an entire app with these same features, script parsing, custom commands, etc...

this is literally just coding using turtle but with more steps and in an app not designed to be like that

#

it should be simple for neuro to be able to draw something, without needing to go neuropilot mode

timber thorn
#

I mean yeah, it's obviously convoluted because I was imagining merging all the functionalities from both ways of drawing, but I can see that their points might be too different.
The idea of saving/downloading the image and use it as background for the next drawing action is basically what I meant with the first hypothetical idea, idk if you can do that on a python library (I could just Google tbh).

timber thorn
#

.
I reformatted my original message, just in case

dusty solar
dusty solar
#

but fr tho at that point just put the -pilot and canvas people together and make a neuropilot container at that point

no need to reinvent the wheel for the second time on both counts when you can just make some small changes and put the two together

timber thorn
#

The main idea of mine was sharing the same ongoing canvas with whatever method she uses.

#

.
Seems like turtle doesn't let you draw on existing images, but other libraries could.

dusty solar
#

potentially

#

if I can find enough research I'll maybe do a prototype but I have other stuff to do so...

elfin shuttle
#

That would be a good feature

#

Also making our own save format might be doable

#

The app already keeps track of action history

dusty solar
#

I wouldn't mind getting back onto this project again

distant barn
dusty solar
distant barn
dusty solar
#

aka "hackable"

distant barn
#

oh, kay

dusty solar
#

the reason why I said "do all roads lead to api" is because I proposed to add an api to a certain other integration

distant barn
#

aaaah, I see

dusty solar
#

anyways

#

3 programmers who also happen to be musicians in one way or another working on a paint-like integration

#

kinda odd 🤔

distant barn
#

🤔

elfin shuttle
dusty solar
#

@elfin shuttle do we hardcode the port in this app?

elfin shuttle
#

its read from environmental variable

#

and falls back to the hardcoded one if not found

dusty solar
#

ah ok

dusty solar
#

something something we should probably work on it something something damn we kinda lazy 💀

dusty solar
#

need to confirm if it's canvas or pilot

elfin shuttle
distant barn
#

Maybe vedal doesn't know this exists?

#

This isn't quite the top post on this forum either

dusty solar
#

Well also tbf there hasn't been any dev work on this for months now

#

partially myself to blame tbh

#

But also, with Vedal's insistence on not using vision for these drawing exercises (for some reason), idk how good it would be

distant barn
dusty solar
#

not at all

distant barn
#

I saw someone in the neuro bot page said they'd suggest it

#

what happened to that?

dusty solar
#

I suspect it's way too hard to implement something like that without also being expensive or smth, idk

#

also it should be noted, how the hell are you gonna be able to do that with the constraints of the api as of right now?

#

I guess you could b64 it and send that off

#

but also you could b64 anything and send that off, like, idk, a piece of malware payload

#

also you need to set up filters so that someone can't just send [explosive images] and cause her to say something uhhhhhh bad

honest terrace
#

he did enable vision for yesterday though

dusty solar
#

when?

timber thorn
timber thorn
dusty solar
dusty solar
#

this thing keeps disappearing off my list but it only took one day for it to disappear

timber thorn
#

Save the link

dusty solar
#

neuro7 to this project

timber thorn
#

Who knows, it might still be useful