Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,9 +101,9 @@ def respond(message, chat_history):
|
|
101 |
|
102 |
context.append({'role':'user', 'content':f"{prompt}"})
|
103 |
|
104 |
-
tokenized_chat = tokenizer.apply_chat_template(context, tokenize=True, add_generation_prompt=True, return_tensors="pt")
|
105 |
|
106 |
-
bot_message = model.generate(
|
107 |
|
108 |
#bot_message = tokenizer.decode(outputs[0]).split("<|assistant|>")[-1].replace("</s>","")
|
109 |
|
|
|
101 |
|
102 |
context.append({'role':'user', 'content':f"{prompt}"})
|
103 |
|
104 |
+
#tokenized_chat = tokenizer.apply_chat_template(context, tokenize=True, add_generation_prompt=True, return_tensors="pt")
|
105 |
|
106 |
+
bot_message = model.generate(context, temp=0.5, top_k = 40, top_p = 1, max_tokens = max_new_tokens)
|
107 |
|
108 |
#bot_message = tokenizer.decode(outputs[0]).split("<|assistant|>")[-1].replace("</s>","")
|
109 |
|