Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def model_generate(text):
|
|
14 |
{"role": "user", "content": text},
|
15 |
]
|
16 |
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
17 |
-
outputs = pipe(prompt, max_new_tokens=256,
|
18 |
return outputs[0]["generated_text"]
|
19 |
|
20 |
iface = gr.Interface(fn=model_generate, inputs=["text"], outputs="text")
|
|
|
14 |
{"role": "user", "content": text},
|
15 |
]
|
16 |
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
17 |
+
outputs = pipe(prompt, max_new_tokens=256, temperature=0.7, top_k=50, top_p=0.95)
|
18 |
return outputs[0]["generated_text"]
|
19 |
|
20 |
iface = gr.Interface(fn=model_generate, inputs=["text"], outputs="text")
|