Skip to content
Anton GoncharovAI systems developer

Machine learning in Python · runs in the browser

Marketplace review analytics

Three marketplaces bring hundreds of reviews a week, and a batch with cracked valves gets noticed only after the rating has already dropped. Here a Python package collects Zerno roastery’s reviews week after week via the seller APIs of three marketplaces, labels sentiment and aspects itself — taste, grind, packaging, delivery, price — and compares each week with the previous ones. It doesn’t trust stars: “five stars, but the pack arrived torn” is a packaging complaint. And a complaint the model didn’t know about, it finds as a new topic.

Scenario: Zerno roastery — fictional, the same as in the quiz and the lead hub: ten coffee, tableware and equipment items on three marketplaces. Six months of reviews are generated, with five incidents hidden in them — from a price increase to short weight.

Demo screenshot: Marketplace review analytics

Open the demo

The first run downloads about 35 MB — Python, numpy, scipy and scikit-learn — and trains the models in a few seconds; after that everything is cached. Best on a computer: the aspect table and charts are wider.

The app runs in your browser: nothing is sent to a server.

What the demo shows

  • Collection via the seller APIs of three marketplaces with their formats and pagination: Wildberries uses skip and take, Ozon last_id, Market page_token; the request log is visible

  • Sentiment is logistic regression on TF-IDF over word stems, accounting for negation; on a control sample it beats a star-based rule: macro-F1 0.88 vs 0.72

  • Eight aspects in every review, by sentence: what’s praised, what’s criticized — and “Why?” with word weights right in the text

  • Alerts without false alarms: complaints about an aspect this week vs. the six weeks before, a binomial z-score separately by product and marketplace

  • New topics: complaints no aspect explains are grouped by NMF — that’s how the short weight the model didn’t know about is found

  • Correct a label and the model retrains immediately, with alerts and topics recalculated

  • Replies to buyers: a template draft, a check against the marketplace’s rules and publishing through its API with a real request and response

  • An Excel report built with pandas and openpyxl, and a “Code” tab with the package sources

How to try it

  1. Look at the overview

    On launch the models train and eight weeks of history are collected automatically. The “Model” tab shows how much more accurate the model is than stars and which words it relies on.

  2. Collect the next weeks

    “Collect next week →” — from week ten, price complaints begin; from week fourteen, cracked valves on Wildberries and Ozon. The alert appears in the very first week, and “Show reviews →” opens them.

  3. Correct the model

    Press “Why?” under a review, and if the model is wrong, correct the label. The model retrains, and alerts and topics are recalculated.

  4. Reply and discover something new

    In the “Replies” tab, publish a draft via the marketplace API. Press “To the end” — the short weight the model didn’t know about appears in the “Topics” tab. Download the Excel file.

No paid neural networks

Zerno and the reviews are fictional. The Wildberries, Ozon and Yandex Market API responses are static files on this same server, a folder for each of 26 weeks; the formats, pagination and reply publishing follow the marketplaces’ documentation. The models are real scikit-learn in the Pyodide WebAssembly build, without paid neural networks: reply drafts are assembled from templates. The same package is tested with pytest on regular Python and runs on a server with a single command.

The demo runs without OpenAI, YandexGPT or GigaChat API keys. Wherever a production system calls a model, there’s a local stub with the same interface — so the demo is free, always available and never makes things up.

What a production project adds

  • Scheduled collection on a server with seller tokens, history in PostgreSQL
  • The model retrains on managers’ labels, with quality checked in CI on a control sample
  • Telegram alerts with buttons: open the reviews, take it on, pass it to production or logistics
  • Reply drafts from a language model following your rules, published after approval
  • A weekly Excel report by email and a dashboard by product and marketplace

Stack

  • Python 3.14
  • scikit-learn
  • pandas
  • openpyxl
  • pytest
  • Pyodide
  • WebAssembly
  • Web Worker
  • Comlink
  • React 19
  • TypeScript
  • Recharts
  • Zustand

Based on

Books and university courses whose ideas are at work in this demo.

  • University course · CMC MSU

    Operating Systems

    Python runs via Pyodide in a separate Web Worker: the models train without blocking the page.

Developer’s comment

Anton Goncharov

AI systems developer · Python

For business

  • A spike in complaints is visible in the very first week — before the listing’s rating drops.
  • Stars can’t be trusted: the model finds a complaint in a five-star review and praise in a three-star one.
  • Problems nobody thought of surface on their own — like short weight in this demo.

For developers

  • scikit-learn in the browser via Pyodide: TF-IDF over word stems with negation handling and character n-grams, logistic regression, aspects as one-vs-rest.
  • Alerts are a binomial z-score for a week, marketplace and product against the six weeks before it, with a higher threshold for narrow slices.
  • Quality is checked on a held-out set: macro-F1 of 0.88 versus 0.72 for a star-based rule. The same package passes pytest in CI.

Tips

  • Tip 01

    Compare the model with a simple rule: if it doesn’t beat it, you don’t need it.

  • Tip 02

    For alerts, calculate statistical significance, not percentages: on small numbers percentages lie.

Want the same for your business?

Tell me about your task — I’ll tell you what from the demo fits, how long it will take and what I’ll need from you.

Other demos in this section

All demos
  • Web app · speech recognition · neural network in the browser

    live

    Voice request

    A customer dictates a request by voice, and the manager gets a ready card: name, company, phone, budget, timeline, task and a score — hot lead or not. Speech is recognized by Whisper right in the browser.

    • React
    • TypeScript
    • In-browser neural network
  • Web app · call in the browser · speech recognition and synthesis

    live

    Voice delivery operator

    A robot takes phone orders instead of the host: it listens, asks again, checks the address against delivery zones, totals the order and reads it back before confirming. The call runs right in the browser — a “Call” button, no phone number.

    • React
    • TypeScript
    • In-browser neural network
  • Web app · speech recognition · sales team quality control

    live

    Call speech analytics

    A sales call becomes a transcript by role, a score against the script and a completed deal card: customer, contacts, interest, the quoted price, the next step and a task for the manager. Speech is recognized by Whisper right in the browser.

    • React
    • TypeScript
    • In-browser neural network
  • Web app · documents · DOCX and PDF

    live

    Proposal and contract generator

    A manager fills in a deal form — buyer, products, discount, VAT — and the commercial proposal, supply contract and invoice are assembled on an A4 page before their eyes. The output is Word, PDF or JSON.

    • React
    • TypeScript
  • Web app · B2B · proposal in PDF

    live

    Price configurator

    A manager builds an order for all the windows in an apartment: type, size, sashes on a diagram, profile, glazing unit and color. Production rules are checked instantly, discounts and installments are calculated automatically, and a numbered proposal goes out as a PDF.

    • React
    • TypeScript
  • Web app · finance · comparison

    live

    Mortgage calculator

    Five bank programs on one screen: which suit the client and why the others don’t. A developer-subsidized rate, differentiated payments, early repayment, debt-to-income ratio and the tax deduction.

    • React
    • TypeScript
  • Web app · estimate · PDF

    live

    Renovation estimate calculator

    Room dimensions turn into floor, wall and ceiling areas, and those into work by stage. Labor and materials separately, the timeline based on crew output, a payment schedule and estimate versions for negotiating with the client.

    • React
    • TypeScript
  • Web app · storefront · checkout · orders

    live

    React SPA catalog

    A whole store in the browser: search with suggestions and keyboard layout correction, facets with live counters, links to any filter, favorites, a cart with a promo code and checkout with a delivery slot. Orders are visible in “My orders” with statuses and can be repeated or cancelled.

    • React
    • TypeScript
  • Website widget · vanilla JS · one line

    live

    AI consultant widget

    A consultant for any website, installed with a single line: it answers from a knowledge base with a link to the source, collects requests and calls an operator. Written in plain JavaScript without frameworks — the whole widget is 21 KB gzipped.

    • Vanilla JS
  • Website widget · vanilla JS · leads

    live

    Quiz lead form

    A quiz instead of a long form: six questions with branching and a price estimate at the end. The manager gets a lead rated “hot / warm / cold” with its ad source, and the “Analytics” tab shows at which step people leave.

    • Vanilla JS
  • Python backend · webhooks → amoCRM and Bitrix24

    live

    Lead integration hub

    Leads from the website, ads, calls, email and bots arrive at webhooks, are normalized, checked for duplicates, routed to managers and delivered to amoCRM and Bitrix24 — with retries when the CRM is unavailable.

    • Python
    • React
    • TypeScript