| title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned |
|---|---|---|---|---|---|---|---|
Mockml - House Price Predictor |
π |
indigo |
yellow |
gradio |
5.23.3 |
main.py |
false |
- A rule-based model that uses a logical formula to estimate house prices.
- A machine learning model trained on synthetic housing data.
Both models predict house prices based on three input features:
- Square meters of the house.
- Number of bedrooms in the house.
- Distance from the city center (in kilometers).
Along with Price (in β¬), the app also provides a confidence score for each prediction, indicating how reliable the prediction is.
The rule-based model uses the following formula to calculate house prices:
price = 400 + 0.15 * sqmt + 200 * bedrooms - 5.5 * distance + bonuses - penalties
Where:
sqmt: Square meters of the house (clipped between 15 and 200).bedrooms: Number of bedrooms (clipped between 1 and 6).distance: Distance from the city center in kilometers (clipped between 0.1 and 50).- Bonuses:
+400ifsqmt > 140andbedrooms > 3.
- Penalties:
-100ifsqmt < 30andbedrooms < 2.
The final price is clipped between β¬400 and β¬3000.
You can access the app demo on Hugging Face Spaces:
π Try the House Price Predictor
This app uses the following Python libraries:
gradionumpypandasscikit-learnjoblib
Make sure to install them before running the app locally.
To run the app locally:
- Clone this repository.
- Install dependencies using
pip install -r requirements.txt. - Run the app with
python main.py. - Open the app in your browser at
http://127.0.0.1:7860.
Enjoy a tiny challenge!