Instructions to use insightful-stays/airbnb-improvement-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use insightful-stays/airbnb-improvement-generator with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("insightful-stays/airbnb-improvement-generator") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
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