tomrb commited on
Commit
81a94f8
1 Parent(s): 2d58eb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,12 +15,12 @@ examples = [["Adventurer is approached by a mysterious stranger in the tavern fo
15
  tokenizer = BloomTokenizerFast.from_pretrained("tomrb/bettercallbloom-3b")
16
  model = BloomForCausalLM.from_pretrained("tomrb/bettercallbloom-3b",low_cpu_mem_usage=True)
17
 
18
- generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
19
 
20
 
21
  def preprocess(text):
22
  #We add 'Question :' and 'Answer #1:' at the start and end of the prompt
23
- return "Question: " + text + "Answer #1:"
24
 
25
 
26
  def generate(text):
 
15
  tokenizer = BloomTokenizerFast.from_pretrained("tomrb/bettercallbloom-3b")
16
  model = BloomForCausalLM.from_pretrained("tomrb/bettercallbloom-3b",low_cpu_mem_usage=True)
17
 
18
+ generator = pipeline('text-generation', model=model, tokenizer=tokenizer,do_sample=False)
19
 
20
 
21
  def preprocess(text):
22
  #We add 'Question :' and 'Answer #1:' at the start and end of the prompt
23
+ return "\nQuestion: " + text + "\nAnswer #1:"
24
 
25
 
26
  def generate(text):