I made a FOSS AI file organizer!
(github.com)
from justzvan@lemmy.ml to programming@programming.dev on 18 Nov 11:35
https://lemmy.ml/post/22630858
from justzvan@lemmy.ml to programming@programming.dev on 18 Nov 11:35
https://lemmy.ml/post/22630858
Hey guys! I built an AI powered file organizer! This was my first “big” Python project!
#programming
threaded - newest
Great work. Can you give some examples of how this works in practice?
Well, my mom has a bit of a problem. She has TONS of unorganized images and documents. I’ll soon implement the folder scanning: so she can just drop in her documents/photos folder and scan the entire thing. Basically, it’s like docs.tagstud.io but I added AI to make the organization process faster.
Thanks
I would not be happy sending a list of my files to 3rd parties. This is not local, it uses an API.
Yeah, I know. I’m planning on adding ollama support.
github.com/QiuYannnn/Local-File-Organizer
This is almost what I need for my ancient meme folder
lol
There: I added basic ollama support. It doesn’t currently support images, though.
Interesting. I was thinking about a project for image classification and description, so we could search for our images in an easy way.
Some feedback:
pyproject.toml
you can merge them a single easy to read and edit fileos.path.join(os.environ[“APPDATA”], “Tagify”, “config.yaml”)
will fail on *nix systems. Usepathlib.Path
instead ofos.path
. Use pathlib, I see on a lot more places it would make your life much easier.Keep up the work, it seems like a nice project!
Thanks! I fixed the file icon licensing! However, I’m not sure will pipx help. I already provide a binary Inno Setup installer. Any suggestions how to port it to Linux? I dual boot - so it would be very useful for me.
Python is installed by default on all linux and mac systems, so it’s just one more command to install pipx. From there just
pipx install tagify
. You don’t need an installer, just specify the build tools in pyproject.toml: packaging.python.org/en/latest/…/pyproject-toml/#… e.g. with setuptools: setuptools.pypa.io/en/…/pyproject_config.htmlIf you publish to pypi it will build the wheel files when you publish a version. That’s the easiest way I know.
Innosetup is windows only. On linux you don’t need such a thing.
Also some feedback, a bit more technical, since I was trying to see how it works, more of a suggestion I suppose
It looks like you’re looping through the documents and asking it for known tags, right? (
{str(db.current_library.tags)}.
)I don’t know if I would do this through a chat completion and a chat response, there are special functions for keyword-like searching, like embeddings. It’s a lot faster, and also probably way cheaper, since you’re paying barely anything for embeddings compared to chat tokens
So the common way to do something like this in AI would be to use Vectors and embeddings: platform.openai.com/docs/guides/embeddings
So - you’d ask for an embedding (A vector) for all your tags first. Then you ask for embeddings of your document.
Then you can do a Nearest Neighbor Search for the tags, and see how closely they match
Cool! But one problem: I’m not using OpenAI. It supports Mistral, ollama and xtekky’s gpt4free
Embeddings are not unique to openai.
It’s called embeddings in other models as well:
huggingface.co/…/getting-started-with-embeddings
ollama.com/blog/embedding-models
Ah, Finally someone had the same idea as me, and actually implemented it.
It’s Windows only though