EliottZemour commited on
Commit
bd89db0
1 Parent(s): 861be40
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ def create_prompt(stars, useful, funny, cool):
16
 
17
  def postprocess(review):
18
  dot = review.rfind('.')
19
- return review[:dot]
20
 
21
  def generate_reviews(stars, useful, funny, cool):
22
  text = create_prompt(stars, useful, funny, cool)
@@ -31,7 +31,7 @@ def generate_reviews(stars, useful, funny, cool):
31
  )
32
  reviews = []
33
  for review in out:
34
- reviews.append(postprocess(tokenizer.decode(review, skip_special_tokens=True)))
35
 
36
  return reviews[0], reviews[1], reviews[2]
37
 
 
16
 
17
  def postprocess(review):
18
  dot = review.rfind('.')
19
+ return review[:dot+1]
20
 
21
  def generate_reviews(stars, useful, funny, cool):
22
  text = create_prompt(stars, useful, funny, cool)
 
31
  )
32
  reviews = []
33
  for review in out:
34
+ reviews.append(postprocess(tokenizer.decode(review)))#, skip_special_tokens=True)))
35
 
36
  return reviews[0], reviews[1], reviews[2]
37