Spaces:
Runtime error
Runtime error
ai-forever
commited on
Commit
•
49d264d
1
Parent(s):
8f9f40e
small fix
Browse files
app.py
CHANGED
@@ -17,12 +17,11 @@ article = (
|
|
17 |
|
18 |
def generate(prompt: str):
|
19 |
input_ids = tokenizer.encode(prompt, return_tensors="pt").cuda(device)
|
20 |
-
out = model.generate(
|
21 |
-
input_ids,
|
22 |
min_length=100,
|
23 |
max_length=200,
|
24 |
top_p=0.8,
|
25 |
-
top_k=0
|
26 |
no_repeat_ngram_size=5
|
27 |
)
|
28 |
generated_text = list(map(tokenizer.decode, out))[0]
|
|
|
17 |
|
18 |
def generate(prompt: str):
|
19 |
input_ids = tokenizer.encode(prompt, return_tensors="pt").cuda(device)
|
20 |
+
out = model.generate(input_ids,
|
|
|
21 |
min_length=100,
|
22 |
max_length=200,
|
23 |
top_p=0.8,
|
24 |
+
top_k=0,
|
25 |
no_repeat_ngram_size=5
|
26 |
)
|
27 |
generated_text = list(map(tokenizer.decode, out))[0]
|