Too8kio commited on
Commit
4912cdd
·
verified ·
1 Parent(s): 2c850f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,8 +10,8 @@ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
10
 
11
  def chat(user_input, history=[]):
12
  prompt = f"{user_input}"
13
- result = pipe(prompt, max_new_tokens=200, do_sample=True, temperature=0.8)
14
- response = result[0]["generated_text"].replace(prompt, "").strip()
15
  history.append((user_input, response))
16
  return history, history
17
 
 
10
 
11
  def chat(user_input, history=[]):
12
  prompt = f"{user_input}"
13
+ result = pipe(prompt, max_new_tokens=100, do_sample=True, temperature=0.8)
14
+ response = result[0]["generated_text"]
15
  history.append((user_input, response))
16
  return history, history
17