{"slug": "ranchi-dukaan-pro-predicting-stock-demand-with-tabpfn-ts", "title": "🏪 Ranchi Dukaan Pro — Predicting Stock Demand with TabPFN-TS", "summary": "A developer built Ranchi Dukaan Pro, a Python and Gradio prototype that uses the TabPFN-TS time-series model to forecast seven-day product demand for a small kirana shop and convert those estimates into reorder recommendations via a simple inventory formula. In a single seven-day holdout on synthetic sales data for milk, bread, and rice, TabPFN-TS beat a same-weekday-last-week baseline with a mean absolute error of 1.29 versus 1.62 units and a WAPE of 9.18% versus 11.56%, though the baseline won for bread. The developer cautions the results come from synthetic data and one test window and do not establish real-world accuracy.", "body_md": "**Can an AI forecast help a small shopkeeper make better stocking decisions?**\n\nSmall retailers have to decide what to reorder, how much stock to keep, and when to place the next order. Too little stock can mean missed sales, while too much inventory can tie up money or increase the risk of expiry and waste.\n\nFor the Hacktoberfest 2026 Open-Source AI Challenge: Week 2 — **Side Hustle**, I built **Ranchi Dukaan Pro**, a prototype that uses TabPFN-TS to estimate the next seven days of product demand and turn those estimates into simple inventory recommendations.\n\nThe goal is to explore whether a small, practical AI tool could be useful to a local kirana shop.\n\nRanchi Dukaan Pro is a Python and Gradio dashboard where users can provide daily sales history and review their current inventory.\n\nThe prototype includes:\n\nThe initial use case is deliberately narrow: helping a small kirana shop make more informed stock-planning decisions.\n\nThe workflow is straightforward:\n\nThe prototype uses this basic rule:\n\n`Reorder quantity = max(0, lead-time demand + safety stock - current stock - incoming stock)`\n\nThe forecasting model estimates demand; the inventory formula makes the reorder recommendation. Keeping these parts separate makes the results easier to inspect and improve.\n\nI generated synthetic daily sales data for three example products: Milk 500 ml, Bread, and Rice 1 kg.\n\nI then held out seven days of historical data and compared TabPFN-TS with a simple baseline that uses sales from the same weekday one week earlier.\n\nThe results from this single test window were:\n\n| Metric | TabPFN-TS | Simple baseline | \n|---|---|---|\n| Mean Absolute Error (MAE) | 1.29 units | 1.62 units | \n| Weighted Absolute Percentage Error (WAPE) | 9.18% | 11.56% | \n\nThe overall results favoured TabPFN-TS in this particular test window. However, the model did not outperform the baseline for every product: the baseline performed better for Bread.\n\n**Important limitation:** these results come from synthetic data and one seven-day holdout. They do not establish real-world accuracy for Ranchi shops. More backtesting and evaluation on real sales records—with the business owner's permission—would be needed before relying on these forecasts for purchasing decisions.\n\n[Open Ranchi Dukaan Pro — Gradio Demo](https://d16fadb268787acd5d.gradio.live/)\n\nThe prototype lets you review sample sales, edit inventory quantities, generate forecasts, and inspect suggested orders.\n\nThe Gradio share link is temporary and may stop working when its session ends.\n\n**Source code:** [GitHub — ranchi-dukaan-pro](https://github.com/Avinash-sdbegin/ranchi-dukaan-pro)\n\nThe repository includes the main application, setup information, and a downloadable project bundle.\n\nThis project uses TabPFN-TS for its forecasting component. I wanted to explore a tabular/time-series model that can be inspected and adapted rather than building the entire application around a closed forecasting service.\n\nThe current prototype uses client/cloud inference; it does not claim to run entirely offline. This distinction matters because shop sales can be commercially sensitive. Before using real business data, it is important to review the provider's data-handling terms and get appropriate permission.\n\nThe wider opportunity with open-source AI is flexibility: developers can study the implementation, experiment with different approaches, and adapt a tool for a specific problem.\n\nThe intended users are small retailers who struggle to track demand and decide what to reorder.\n\nA future version could offer an affordable subscription for features such as recurring forecasts, inventory reports, expiry-aware suggestions, and easier sales imports.\n\nThis is currently a **business hypothesis, not validated demand**. I have not yet established that a real shopkeeper would pay for this prototype. The next step is to show it to a local retailer, understand their current workflow, and learn whether the forecasts and recommendations would actually help.\n\nBuilding this prototype reinforced three lessons:\n\nNext, I would like to test multiple historical windows, handle missing records and stock-outs more carefully, account for expiry and supplier constraints, and collect feedback from a real shopkeeper.\n\nRanchi Dukaan Pro is an early experiment in making demand forecasting more accessible to small retailers.\n\nIt is not yet a production inventory system, and its predictions should not be treated as guaranteed demand. But it provides a working starting point for exploring how open-source AI can support everyday business decisions.\n\nBuilt for the **Hacktoberfest Open-Source AI Challenge: Week 2 — Side Hustle**.", "url": "https://wpnews.pro/news/ranchi-dukaan-pro-predicting-stock-demand-with-tabpfn-ts", "canonical_source": "https://dev.to/avinash_kumar_9cd2bf0c903/ranchi-dukaan-pro-predicting-stock-demand-with-tabpfn-ts-6cn", "published_at": "2026-10-16 03:21:32+00:00", "updated_at": "2026-10-16 03:30:16.934635+00:00", "lang": "en", "topics": ["machine-learning", "ai-tools", "developer-tools"], "entities": ["Ranchi Dukaan Pro", "TabPFN-TS", "Gradio", "GitHub", "Avinash-sdbegin", "Hacktoberfest 2026 Open-Source AI Challenge"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/ranchi-dukaan-pro-predicting-stock-demand-with-tabpfn-ts", "markdown": "https://wpnews.pro/news/ranchi-dukaan-pro-predicting-stock-demand-with-tabpfn-ts.md", "text": "https://wpnews.pro/news/ranchi-dukaan-pro-predicting-stock-demand-with-tabpfn-ts.txt", "jsonld": "https://wpnews.pro/news/ranchi-dukaan-pro-predicting-stock-demand-with-tabpfn-ts.jsonld"}}