Norod78 commited on
Commit
494dd7b
1 Parent(s): 83f2772

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -37,7 +37,8 @@ def generate_fakypedia(article_title: str):
37
  result = ""
38
  string_to_tokenize= f"{bos_token}\\%{article_title}"
39
  input_ids = tokenizer(string_to_tokenize, return_tensors="pt").input_ids.to(device)
40
- sample_outputs = model.generate(input_ids, do_sample=True,repetition_penalty=1.2, temperature=0.50, max_length=192, num_return_sequences=3)
 
41
  if article_title == None or len(article_title) == 0:
42
  result += f"# תוצאות פייקיפדיה עם כותרות אקראיות \n"
43
  article_title = ""
 
37
  result = ""
38
  string_to_tokenize= f"{bos_token}\\%{article_title}"
39
  input_ids = tokenizer(string_to_tokenize, return_tensors="pt").input_ids.to(device)
40
+ sample_outputs = model.generate(input_ids, do_sample=True,repetition_penalty=1.05, top_k = 40, top_p = 0.950, temperature=0.80, max_length=192, num_return_sequences=3)
41
+ #sample_outputs = model.generate(input_ids, do_sample=True,repetition_penalty=1.2, temperature=0.50, max_length=192, num_return_sequences=3)
42
  if article_title == None or len(article_title) == 0:
43
  result += f"# תוצאות פייקיפדיה עם כותרות אקראיות \n"
44
  article_title = ""