Airbnb Improvement Generator

This model generates actionable improvement suggestions from Airbnb guest reviews.

Input

Plain English review text.

Output

Concrete improvement actions (or "No improvements needed").

Base model

google/flan-t5-base

Fine-tuning data

Airbnb reviews with human-written improvement suggestions.

Example

%pip install torch transformers accelerate

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# ---- device selection ----
device = (
    "cuda" if torch.cuda.is_available()
    else "mps" if torch.backends.mps.is_available()
    else "cpu"
)

print("Using device:", device)

# ---- load model + tokenizer ----
MODEL_NAME = "insightful-stays/airbnb-improvement-generator"

tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME).to(device)
model.eval()

print("Model loaded.")

review = "It's a nice chalet with all facilities you need. The owner responds quickly and is attentive. The location is close to Zabjlak, but just far enough to be out of the crowds there, which is pleasant. In front of the chalet there is a road which is quiet busy. There is no (sound) isolation, whereby you hear every car passing next to you, dogs barking at night and workings driving up and down next to the chalet. About the dogs, there were 3 dogs roaming freely and staid on the porch whole the time."

inputs = tokenizer(
    f"Generate improvements: {review}",
    return_tensors="pt",
    truncation=True,
    max_length=512,
).to(device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_length=128,
        num_beams=4,
    )

result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
Downloads last month
43
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support