Neu256 commited on
Commit
1bffac2
·
verified ·
1 Parent(s): 2e18eab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, do_sample=True, 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")
 
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")