AlejandroLanaspa commited on
Commit
d21cbfc
·
1 Parent(s): 51ea30b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def generate(text,guess):
18
  guess = "Brad Pitt"
19
 
20
  inputs = tokenizer(f"Answer with yes or no the following question about {guess}: {text}?", return_tensors="pt")
21
- return model.generate(**inputs)[0]
22
 
23
  examples = [
24
  ["Is it dead?"],
 
18
  guess = "Brad Pitt"
19
 
20
  inputs = tokenizer(f"Answer with yes or no the following question about {guess}: {text}?", return_tensors="pt")
21
+ return tokenizer.batch_decode(model.generate(**inputs), skip_special_tokens=True)[0]
22
 
23
  examples = [
24
  ["Is it dead?"],