Harsh Trivedi commited on
Commit
194eb07
1 Parent(s): 8876ad8
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -31,7 +31,7 @@ Please checkout the details in our [github repository](https://github.com/stonyb
31
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
32
  from digit_tokenization import enable_digit_tokenization # digit_tokenization.py from https://github.com/stonybrooknlp/teabreac
33
 
34
- model_name = "teabreac-nt5-small"
35
  tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False) # Fast doesn't work with digit tokenization
36
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
37
  enable_digit_tokenization(tokenizer)
@@ -44,7 +44,7 @@ input_ids = tokenizer(
44
  input_texts, return_tensors="pt",
45
  truncation=True, max_length=800,
46
  add_special_tokens=True, padding=True,
47
- )
48
  generated_ids = model.generate(input_ids, min_length=1, max_length=50)
49
  generated_predictions = tokenizer.batch_decode(generated_ids, skip_special_tokens=False)
50
  generated_predictions = [
 
31
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
32
  from digit_tokenization import enable_digit_tokenization # digit_tokenization.py from https://github.com/stonybrooknlp/teabreac
33
 
34
+ model_name = "StonyBrookNLP/teabreac-nt5-small"
35
  tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False) # Fast doesn't work with digit tokenization
36
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
37
  enable_digit_tokenization(tokenizer)
 
44
  input_texts, return_tensors="pt",
45
  truncation=True, max_length=800,
46
  add_special_tokens=True, padding=True,
47
+ )["input_ids"]
48
  generated_ids = model.generate(input_ids, min_length=1, max_length=50)
49
  generated_predictions = tokenizer.batch_decode(generated_ids, skip_special_tokens=False)
50
  generated_predictions = [