Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def generate(
|
|
23 |
if model_name == "M4-ai/tau-1.8B":
|
24 |
prompt = user_input
|
25 |
else:
|
26 |
-
prompt = f"<|im_start|>
|
27 |
streamer = TextIteratorStreamer(pipe.tokenizer, timeout=240.0, skip_prompt=True, skip_special_tokens=True)
|
28 |
generation_kwargs = dict(text_inputs=prompt, streamer=streamer, max_new_tokens=max_new_tokens, do_sample=True, top_p=top_p, top_k=top_k,
|
29 |
temperature=temperature, num_beams=1, repetition_penalty=1.1)
|
|
|
23 |
if model_name == "M4-ai/tau-1.8B":
|
24 |
prompt = user_input
|
25 |
else:
|
26 |
+
prompt = f"<|im_start|>user\n{user_input}<|im_end|>\n<|im_start|>assistant\n"
|
27 |
streamer = TextIteratorStreamer(pipe.tokenizer, timeout=240.0, skip_prompt=True, skip_special_tokens=True)
|
28 |
generation_kwargs = dict(text_inputs=prompt, streamer=streamer, max_new_tokens=max_new_tokens, do_sample=True, top_p=top_p, top_k=top_k,
|
29 |
temperature=temperature, num_beams=1, repetition_penalty=1.1)
|