TrLOX commited on
Commit
fc6e0e6
·
1 Parent(s): 555dc8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ def text_generation(keywords, domain):
11
  torch.manual_seed(random.randint(0,18446744073709551615))
12
  outputs = model.generate(input_ids, do_sample=True, min_length=50, max_length=250)
13
  generated_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)
14
- title_description_arr = generated_text.split(' title ')[1].split('description')
15
  title = title_description_arr[0].strip()
16
  description = title_description_arr[1].strip()
17
  return title + "\r\n" + description
 
11
  torch.manual_seed(random.randint(0,18446744073709551615))
12
  outputs = model.generate(input_ids, do_sample=True, min_length=50, max_length=250)
13
  generated_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)
14
+ title_description_arr = generated_text[0].split(' title ')[1].split('description')
15
  title = title_description_arr[0].strip()
16
  description = title_description_arr[1].strip()
17
  return title + "\r\n" + description