This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
The father of a friend runs an electrical shop. Wires, switches, bulbs, around 750 different things on the shelves.
Every week he decides what to order by walking along those shelves and looking. Sometimes he orders too much. Sometimes a thing is finished before he notices.
He already uses a billing app, and that app already makes two reports: every bill he has written, and how much stock is left. Nobody reads them.
So I built Shop Stock Predictor. He gives it those two reports, and it says what will run out in the next 7 days and how much to order. The note comes in Hindi, English or Hinglish. The order goes to WhatsApp, a printed sheet, or a receipt printer.
The page looks like the tear-off date calendar that hangs behind most shop counters in India: a big date, red Sundays, the weekday in Hindi and English. The next seven days are seven leaves, and each item sits on the day it will finish. I chose that look because it is something he already reads every morning.
Demo
Try it: shop-stock-predictor.onrender.com. It runs on a free host that sleeps, so the first visit can take about a minute.
"Try it with sample data" opens a recorded real run on made-up grocery items. You can also download the two sample files from the page and upload them to run it live.
The voice in the video is my own, cloned with ElevenLabs.
Code
avionicharshit-byte
/
shop-stock-predictor
Tells a small shop what will run out this week and how much to order. TabPFN + Gemma, runs on one laptop.
Shop Stock Predictor
Tells a small shop what will run out this week and how much to order.
Built for a friend's father, who runs an electrical shop and decides what to reorder by walking the shelves. He gives it the two reports his billing app already makes. He gets back a short note in Hindi, English or Hinglish and an order list to send on WhatsApp or print.
Try it live ·
Watch the one-minute video ·
Made for the DEV Hacktoberfest Weekend Challenge: Build for a Friend
The free host sleeps when idle, so the first visit can take about a minute.
What it does
How it works
TabPFN, an open model for tables, guesses each item's sales for the…
MIT licensed. There are two ways to run it:
- On the shop laptop. TabPFN and Gemma both run locally, and the sales never leave the machine.
- On the website. The free host has 512 MB of memory and cannot hold the models, so it calls TabPFN through the Prior Labs API and Gemma 4 through the Google API. Item names go to neither. Only quantities and the position of each day on the calendar are sent.
How I Built It
I kept one rule: the AI never decides a number. A wrong number here becomes a wrong order.
- TabPFN guesses how much of each item will sell on each of the next 7 days.
- Plain arithmetic compares that with the stock, finds the day it runs out, and works out the order.
-
Gemma 4 only rewords each finished line. It never sees an item name or a number. It gets
[ITEM] will run out of stock by Monday, order [QTY] pieces, and my code puts the real values back. - Code checks every line Gemma writes. Each blank must survive exactly once and the right weekday must be named. A line that fails stays as the plain sentence.
What went wrong with TabPFN first
My first version put every item into one table, with averages I made by hand. On a public dataset it lost to a plain average: 228 pieces off per week against 143.
The mistake was mine. The forecasting recipe from Prior Labs is one small table per item, with nothing but calendar features. After I rebuilt it that way, it was closer than the plain average in six hidden weeks out of six on that same dataset.
Does it help on the real shop?
The app has an honesty test. It hides the last week of sales, predicts it, and shows how far off TabPFN was, next to two averages that need no AI.
On three months of real bills from the shop, over six hidden weeks, in pieces off per item:
| Guess | Per day | Per week |
|---|---|---|
| Plain average | 0.81 | 3.71 |
| Same-weekday average | 0.80 | 3.70 |
| TabPFN | 0.63 | 3.27 |
TabPFN was closer per day in six weeks of six, and per week in five of six. With only one month of bills it was a toss-up: one week won, one lost.
What went wrong with Gemma first
Asked to rewrite a whole list, it added "Okay, here is a WhatsApp note" and an English translation nobody asked for. Given one example, it copied the day from that example into every line. It spelled numbers as words and invented "kal".
Blanks, two examples per language and a check on every line fixed it. I tried this with Gemma 3 locally too, and it worked fine. On the site, Gemma 4 took 11 seconds a line until I turned its thinking down. Then it took 2.
The day I tested the real files
On a big shop the site checks 25 items. I had it pick the 25 best sellers. It said one item needed ordering.
It was right, and useless. The best sellers are the things he never lets run low. Plain arithmetic over all 332 regular items showed 23 about to finish, and only one of them was a best seller. Now the site picks the 25 items closest to running out, and the model predicts those.
Printing
A web page can talk to a Bluetooth printer directly in Chrome. So the order list prints on a 2 inch thermal printer straight from the browser, with the same bytes the laptop version sends. I have tested it on one printer.
What is still not good
- The "busy week" number is meant to cover 8 weeks in 10. On the real shop it covered 66 percent of items.
- Scanned or handwritten bills are not read.
- A sudden bulk sale cannot be predicted by anything.
- The website runs on free quotas, so live checks are limited each day. When they run out, the page says so and the recorded run still works.
Why Does Open Innovation Matter
The sales of a shop are its private business. The only reason I could build this for him is that the models are open.
The TabPFN weights are open, so on his laptop the forecast runs with no account and no internet. The Gemma weights are open, so the Hindi note is written on the same machine. Nothing he sells has to leave the shop to get an answer.
And the recipe that fixed my forecast was not mine. It was written down in a paper anyone can read. I lost to a plain average until I followed it.
Prize Categories
- Best Use of TabPFN. It makes every forecast, and the app measures it against two plain averages on real sales instead of asking you to trust it.
- Best Use of Gemma. Gemma 4 words every note in Hindi, English or Hinglish, kept away from the numbers and checked line by line.
The site is hosted on Render.






Top comments (0)