Run this model with HF Jobs

Run FerData/regresion-casas-sklearn on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/FerData/regresion-casas-sklearn. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/FerData/regresion-casas-sklearn on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
FerData's picture
Upload 6 files
7da3be6 verified
Raw History Blame Contribute Delete
583 Bytes
"""Carga model.joblib y predice el precio de casas nuevas. No vuelve a entrenar.
Uso:
python predict.py
"""
from pathlib import Path
import joblib
import pandas as pd
CARPETA = Path(__file__).parent
modelo = joblib.load(CARPETA / "model.joblib")
# Las columnas tienen que llamarse igual que en el entrenamiento
casas_nuevas = pd.DataFrame(
{"m2": [50, 80, 110], "balcon": [0, 1, 1], "ascensor": [0, 0, 1]}
)
for casa, precio in zip(casas_nuevas.to_dict("records"), modelo.predict(casas_nuevas)):
print(f"{casa} -> {precio:.1f} miles de US$")