Danil Sharov - ~/portfolio/cases open for projects

danil@agent:~/portfolio$ cat cases/realty.md

Scoring admin panel: counters, scoring by listing ID and a filtered selection
Admin panel: score by listing ID or as a selection, the same way as on the site's chart. Before a run you see the number of properties, the cost and the time

AI property scoring from photos

External client · property search service in Spain · smart-choice.es

The client compares thousands of villas and apartments in Tenerife and on the Malaga coast. He scores each property from its photos using his own method: 64 weighted criteria in nine categories. By hand he gets through a few properties a day. The task: calculate the score automatically, with a button on the site or in batches by filter, with a report for the buyer and the results written to his Google Sheets.

# what was built

  • Scoring in one request. The model gets all listing photos and the description and answers in a fixed schema, choosing only from the client's lists. The final 1 to 10 score is calculated by code using category weights.
  • Buyer report. A page in the site's brand style: a chart by category, pros and cons, what to check at the viewing, all photos. Russian and English, with a PDF.
  • Ordering from the site. A button on the property page: the person leaves their contacts, and the property goes to the front of the queue. The report takes about 25 seconds, then a link to it and the PDF arrive by email. The next buyer gets the finished report right away, with no new model call. Users can upload their own photos: the browser compresses them and strips metadata.
  • Admin panel. Selection like on the site's chart: region, price, bedrooms, areas, top N by rating. Reports, requests, export to Google Sheets and CSV.
  • Writing to the client's sheets. The module writes by property ID and only into empty cells, so the client's manual data stays untouched. Scores show up on his property chart without manual copying.

# report

Expert verdict: final score and a chart by category
Verdict: a sector's area equals the category weight, its length equals the score
Breakdown by category: scores, pros and cons, criteria ratings
What makes up the total: nine categories, each with pros, cons and criteria scores

# how the model was chosen

The model was chosen by measurement. The client used to score properties by hand, and we ran several models on his past scores. The cheap Haiku scored every property about one point too low on average and mixed up categories: under "Space" it wrote about the pool. The chosen model, at the same price, differs from the client's scores by half a point on average, and a repeat run on the same property gives almost the same result.

The model and provider are switched in settings: four APIs are connected, each with its own key, and prices are pulled from a catalog. There is a daily spending cap. On a key error the queue pauses and shows a banner, so no attempts are wasted.

# someone else's server

The module runs on the client's old server next to another studio's code: outdated PHP, no Python, little memory. So it is written in PHP and SQLite, with no frameworks or third-party packages. The queue runs on a schedule and uses no memory when idle. The module works only inside its own folder and does not touch anyone else's code.

# problems solved along the way

  • The first deploy failed when saving a task. SQLite on the server is an old version and does not support the command needed. The query was rewritten, and tests now run on the server too.
  • Emails were not delivered. The mail server rejected emails built as one long line. Now each email has a plain text and an HTML part, with line breaks.
  • PDF on a weak server. The PDF report is printed by a separate container with Chromium that has a hard memory limit. If the container goes down, the button switches to printing from the browser.
  • Translation without a second analysis. The model writes the report from the photos in Russian, then a separate cheap request without photos translates the text. The English version costs a tenth of a cent.

# result

The module runs on the client's site with a catalog of 13,000+ properties. Reports are ordered with the button on the site and in batches from the admin panel, scores go to the sheets and the chart. One property costs ~$0.005 and takes about 25 seconds. The whole catalog costs tens of dollars, by hand it would take months. The stage is paid, and the client handed over the next task.

Need scoring from photos or a catalog review using your own method? Message me on Telegram

danil@agent:~/portfolio$ ls cases/

# client work

# side projects