Ateeqq commited on
Commit
3224843
·
verified ·
1 Parent(s): 14a82a8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -39,7 +39,7 @@ Developed by https://exnrt.com
39
  - Train Loss: 1.6578
40
  - Validation Loss: 1.8115
41
 
42
- You can also use `t5-small` (77M params) available in mini folder.
43
 
44
  ## How to use
45
 
@@ -51,7 +51,7 @@ tokenizer = AutoTokenizer.from_pretrained("Ateeqq/keywords-title-generator", tok
51
  model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/keywords-title-generator", token='your_token').to(device)
52
 
53
  def generate_title(keywords):
54
- input_ids = tokenizer(f'generate title: {keywords}', return_tensors="pt", padding="longest", truncation=True, max_length=24).input_ids.to(device)
55
  outputs = model.generate(
56
  input_ids,
57
  num_beams=5,
 
39
  - Train Loss: 1.6578
40
  - Validation Loss: 1.8115
41
 
42
+ You can also use `t5-small` (77M params) available in [mini](https://huggingface.co/Ateeqq/keywords-title-generator/tree/main/mini) folder.
43
 
44
  ## How to use
45
 
 
51
  model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/keywords-title-generator", token='your_token').to(device)
52
 
53
  def generate_title(keywords):
54
+ input_ids = tokenizer(keywords, return_tensors="pt", padding="longest", truncation=True, max_length=24).input_ids.to(device)
55
  outputs = model.generate(
56
  input_ids,
57
  num_beams=5,