sinafuchs
Add: README.md with HF Space configuration frontmatter
5283880
|
Raw
History Blame Contribute Delete
1.91 kB
---
title: Zurich Apartment Rent Assistant
emoji: 🏠
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.9.1
app_file: app.py
pinned: false
---
# Zurich Apartment Rent Assistant
A conversational AI agent that estimates monthly rental prices for apartments in Zurich, Switzerland.
Describe an apartment in plain language — the agent extracts the relevant parameters and runs a machine-learning prediction.
## How it works
1. **You describe** an apartment in natural language (rooms, size, location, features)
2. **GPT-4o-mini** extracts structured parameters and outputs them as JSON
3. **A Gradient Boosting regression model** (trained on ~800 Zurich listings) predicts the monthly rent
4. **GPT-4o-mini** translates the prediction back into a friendly, contextualised explanation
## Example inputs
- "I'm looking for a 3-room apartment, about 80 m², in Kreis 3."
- "What would a furnished 1.5-room apartment in Zurich city, roughly 40 m², cost?"
- "I want a 4.5-room penthouse with lake view in Kreis 8, about 150 m². It's luxurious."
## Parameters the model uses
| Parameter | Description |
|-----------|-------------|
| rooms | Number of rooms (half-rooms supported, e.g. 3.5) |
| area | Living area in m² |
| tax_income | Municipal median tax income (proxy for neighbourhood wealth) |
| luxurious / furnished / temporary | Apartment type flags |
| zurich_city | True = within city of Zurich, False = greater canton |
| attika / loft / seesicht | Special features |
| kreis | Zurich city district (Kreis 1–12) |
## Setup
The app requires an `OPENAI_API_KEY` environment variable (set as a Hugging Face Space secret).
## Model
- **Algorithm:** Gradient Boosting Regressor (scikit-learn)
- **Training data:** ~800 Canton Zurich apartment listings
- **Key features:** Income-Density Score (tax income × population density), log-transformed area, district dummies
- **CV R²:** ~0.70