Skip to content

michaelnation26/yelp-review-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yelp Review Generator

A seq2seq (BERT) model from HuggingFace was trained on the Yelp Open Dataset to generate Yelp reviews.

Dataset

Model Input Features

  • stars: rating of business (1 - 5)
  • funny: number of funny votes received
  • elite level: total number of years the reviewer was elite
  • name: business' name
  • city: city of the business
  • categories: business categories

The six input features are concatenated into a single string for each example.

Model Output (label)

  • Yelp review

During training, the Yelp review is constrained to 128 tokens. During inference, the model can generate words until an EOS token is generated or stopped early at a predetermined fixed length.

Getting Started

Training the Model

To train a new model, use the seq2seq_train notebook. The Yelp Open Dataset needs to be downloaded first.

Generate Reviews with Trained Model

Use the seq2seq_predict notebook. The model trained from this project will be downloaded automatically in the notebook. You don't have to provide your own trained model.

About

Trains a seq2seq model to generate Yelp reviews.

Resources

License

Stars

Watchers

Forks

Packages

No packages published