Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def clean_text(text):
|
|
14 |
|
15 |
def predict(prompt):
|
16 |
inputs = tokenizer(prompt, return_tensors="pt").input_ids
|
17 |
-
outputs = model.generate(inputs, min_length=100, max_length=500, do_sample=True, top_k=
|
18 |
completion = tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
19 |
return clean_text(completion[0])
|
20 |
|
|
|
14 |
|
15 |
def predict(prompt):
|
16 |
inputs = tokenizer(prompt, return_tensors="pt").input_ids
|
17 |
+
outputs = model.generate(inputs, min_length=100, max_length=500, do_sample=True, top_k=50, top_p=0.95)
|
18 |
completion = tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
19 |
return clean_text(completion[0])
|
20 |
|