Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def generate_fakypedia(article_title: str):
|
|
31 |
result = ""
|
32 |
string_to_tokenize= f"{bos_token}\\%{article_title}"
|
33 |
input_ids = tokenizer( string_to_tokenize, return_tensors="pt").input_ids.to(device)
|
34 |
-
sample_outputs = model.generate(input_ids, do_sample=True,repetition_penalty=1.2, temperature=0.5, max_length=
|
35 |
if article_title == None or len(article_title) == 0:
|
36 |
result += f"# Fakypedia results with random titles \n"
|
37 |
article_title = ""
|
|
|
31 |
result = ""
|
32 |
string_to_tokenize= f"{bos_token}\\%{article_title}"
|
33 |
input_ids = tokenizer( string_to_tokenize, return_tensors="pt").input_ids.to(device)
|
34 |
+
sample_outputs = model.generate(input_ids, do_sample=True,repetition_penalty=1.2, temperature=0.5, max_length=128, num_return_sequences=3)
|
35 |
if article_title == None or len(article_title) == 0:
|
36 |
result += f"# Fakypedia results with random titles \n"
|
37 |
article_title = ""
|