Spaces:
Sleeping
Sleeping
julienlesbegueries
commited on
Commit
•
25aaa11
1
Parent(s):
e0a30e0
up
Browse files
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 |
-
|
|
|
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):
|