Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def generate_text(system_prompt, user_prompt, temperature, max_length, min_lengt
|
|
14 |
|
15 |
inputs = tokenizer(tokenized_chat, return_tensors="pt").to(model.device)
|
16 |
|
17 |
-
outputs = model.generate(**inputs, use_cache=True, max_length=max_length, min_length=min_length, temperature=temperature, num_return_sequences=1)
|
18 |
|
19 |
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
20 |
|
|
|
14 |
|
15 |
inputs = tokenizer(tokenized_chat, return_tensors="pt").to(model.device)
|
16 |
|
17 |
+
outputs = model.generate(**inputs, use_cache=True, max_length=max_length, min_length=min_length, temperature=temperature, num_return_sequences=1, do_sample=True)
|
18 |
|
19 |
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
20 |
|