abdiharyadi commited on
Commit
5a389e5
·
1 Parent(s): f02f710

feat: remove max length limit

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -75,7 +75,7 @@ def generate_story():
75
 
76
  isi_not_checked = False
77
 
78
- if gpt_out[-1] == gpt_tokenizer.eos_token_id or len(gpt_out) == 512:
79
  prompt_stop = True
80
  else:
81
  prompt = result
@@ -85,7 +85,7 @@ def generate_story():
85
  if (not any(end_part.startswith(x) for x in ["bersambung", "tamat"])):
86
  print("Invalid ending! Regenerating ....")
87
  prompt = f"<s> awal cerita | judul: {judul} | {isi} |"
88
- continue
89
 
90
  stop = True
91
 
 
75
 
76
  isi_not_checked = False
77
 
78
+ if gpt_out[-1] == gpt_tokenizer.eos_token_id:
79
  prompt_stop = True
80
  else:
81
  prompt = result
 
85
  if (not any(end_part.startswith(x) for x in ["bersambung", "tamat"])):
86
  print("Invalid ending! Regenerating ....")
87
  prompt = f"<s> awal cerita | judul: {judul} | {isi} |"
88
+ continue
89
 
90
  stop = True
91