Views
No views yet
Cleanliness, Noise / Quietness)1from train.train_canonical_classifier_improve import ImprovementGenerator
2
3CANONICAL_ISSUES = [
4 "Cleanliness",
5 "Communication",
6 "Location",
7 "Value / Price",
8 "Accuracy / Description Match",
9 "Check-in / Convenience",
10 "Amenities / Comfort",
11 "Safety / Security",
12 "Noise / Quietness",
13 "Wifi",
14 "Host Behavior / Professionalism / Respect",
15]
16
17model = ImprovementGenerator()
18model.load("insightful-stays/airbnb-review-improvement-extractor")
19
20review = """
21Not a bad place, but there were no curtains in the shower, the bathroom was often wet,
22and communication was difficult because the hosts did not speak English.
23"""
24
25for aspect in CANONICAL_ISSUES:
26 result = model.generate(review=review, aspect=aspect)
27 print(aspect, result)
28