Spaces:
Build error
Build error
Eliott
commited on
Commit
·
445b401
1
Parent(s):
1f57142
sampling strategy
Browse files
app.py
CHANGED
|
@@ -24,9 +24,10 @@ def generate_reviews(stars, useful, funny, cool):
|
|
| 24 |
out = model.generate(
|
| 25 |
input_ids=inputs.input_ids,
|
| 26 |
attention_mask=inputs.attention_mask,
|
| 27 |
-
|
| 28 |
num_return_sequences=3,
|
| 29 |
-
temperature=1.2
|
|
|
|
| 30 |
)
|
| 31 |
reviews = []
|
| 32 |
for review in out:
|
|
|
|
| 24 |
out = model.generate(
|
| 25 |
input_ids=inputs.input_ids,
|
| 26 |
attention_mask=inputs.attention_mask,
|
| 27 |
+
do_sample=True,
|
| 28 |
num_return_sequences=3,
|
| 29 |
+
temperature=1.2,
|
| 30 |
+
top_p=0.9
|
| 31 |
)
|
| 32 |
reviews = []
|
| 33 |
for review in out:
|