zman1x1 commited on
Commit
76842ff
1 Parent(s): 1cce785
models/t5_small_medium_title_generation.py CHANGED
@@ -4,7 +4,7 @@ import torch
4
 
5
  def t5model(prompt: str) -> str:
6
  tokenizer = AutoTokenizer.from_pretrained("fabiochiu/t5-small-medium-title-generation")
7
- model = AutoModelForSeq2SeqLM.from_pretrained("fabiochiu/t5-small-medium-title-generation", torch_dtype=torch.float16)
8
  inputs = tokenizer(
9
  ["summarize:" + prompt],
10
  return_tensors="pt",
 
4
 
5
  def t5model(prompt: str) -> str:
6
  tokenizer = AutoTokenizer.from_pretrained("fabiochiu/t5-small-medium-title-generation")
7
+ model = AutoModelForSeq2SeqLM.from_pretrained("fabiochiu/t5-small-medium-title-generation", torch_dtype=torch.float32)
8
  inputs = tokenizer(
9
  ["summarize:" + prompt],
10
  return_tensors="pt",