Manjushri commited on
Commit
3b4390a
1 Parent(s): 961a18c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ model = AutoModelForCausalLM.from_pretrained("KoboldAI/OPT-2.7B-Erebus")
8
 
9
  def chat(Prompt):
10
  input_ids = tokenizer(Prompt, return_tensors="pt").input_ids
11
- generated_ids = model.generate(input_ids, repetition_penalty = 2.5, top_k = 75, max_length=256, eos_token_id=tokenizer.eos_token_id)
12
  bot = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
13
  return bot
14
 
 
8
 
9
  def chat(Prompt):
10
  input_ids = tokenizer(Prompt, return_tensors="pt").input_ids
11
+ generated_ids = model.generate(input_ids, use_cache=True, repetition_penalty = 2.5, top_k = 75, max_length=256, eos_token_id=tokenizer.eos_token_id)
12
  bot = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
13
  return bot
14