Following from my previous post I’ve explored with an algorithm to create Sudokus by iterating from an empty grid by adding valid numbers to random cells and then invoking the solving function twice, once navigating the solution space from 1 to 9 and the other in reverse. If both solving functions return the same, valid, […]
Just a small practice exercise that solves Sudoku by iterating over valid values for each cell and backtracking on errors. I like how compact the solution is, although probably not very performant. from pprint import pprint from math import floor from copy import deepcopy grid = [] content = None with open('startgrid.txt', 'r') as file: […]
FAISS implements similarity search. Sentence Transformers encodes sentences into vectors FAISS can use. Llama can be configured to perform semantic searches in a FAISS vector store. By combining all of the above together we can build a local GenAI powered assistant capable of performing semantic queries to extract information from a local corpus of documents, […]
I’ve made a digital photo frame that displays random photo from my Google Photo library enriched with an Haiku generated by a LLaVa instance using the same photo as reference. Here’s a video of the digital photo frame in action: The frame is an old Kobo Glo which I repurposed using this great guide I […]
Wikimedia has a nice API which provides the facts of the day in JSON format, something like: { "text": "Named after Bikini Atoll, the site of the nuclear weapons test Operation Crossroads in the Marshall Islands, the modern bikini was introduced at a fashion show in Paris", "year": 1946 }, { ... We can take […]
Lately I’ve been spent some time using ControlNet to process some of my sketches, the results are quite interesting and show the potential of the technology even when the starting sketch is very low quality and noisy, due to being on squared paper.
Quality is subjective, true, but can we show that no matter the audience a fantasy book is always better than an horror book? If this would be the case it’d mean that even readers who prefer horror books should give higher ratings to an horror-fantasy book than an horror book of other sub-genres. As you […]
This experiment combines hsl.js and tensorflow.js to perform real time object detection from a browser. When the mouse hovers the canvas the entire stream is shown, with the detected object framed in a black box, otherwise only the parts of the stream corresponding to detected objects are displayed. You can read more about this project […]
In these days I’m spending some time reading about machine learning. To practice what I’ve read I’ve built a super simple, but working, glyph classifier, that recognizes the first five letters of the alphabet when drawn on an HTML canvas. You can try it here and check its source code on github.