julienlesbegueries commited on
Commit
25aaa11
1 Parent(s): e0a30e0
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -31,9 +31,10 @@ def print_like_dislike(x: gr.LikeData):
31
 
32
  def add_ia_text(history, text):
33
  messages.append({"role": "user", "content": text})
34
- prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
35
- outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
36
- history = history + ["IA: "+(outputs[0]["generated_text"], None)] # type: ignore
 
37
 
38
 
39
  def add_text(history, text):
 
31
 
32
  def add_ia_text(history, text):
33
  messages.append({"role": "user", "content": text})
34
+ # prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
35
+ # outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
36
+ response =
37
+ history = history + [(outputs[0]["generated_text"]), None] # type: ignore
38
 
39
 
40
  def add_text(history, text):