bixentemal commited on
Commit
bebff77
1 Parent(s): 22151c8

Gramatical acceptance T5

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as grad
3
  text2text_tkn= T5Tokenizer.from_pretrained("t5-small")
4
  mdl = T5ForConditionalGeneration.from_pretrained("t5-small")
5
  def text2text_sentiment(text):
6
- inp = "sst2 sentence: "+text
7
  enc = text2text_tkn(inp, return_tensors="pt")
8
  tokens = mdl.generate(**enc)
9
  response=text2text_tkn.batch_decode(tokens)
 
3
  text2text_tkn= T5Tokenizer.from_pretrained("t5-small")
4
  mdl = T5ForConditionalGeneration.from_pretrained("t5-small")
5
  def text2text_sentiment(text):
6
+ inp = "cola sentence: "+text
7
  enc = text2text_tkn(inp, return_tensors="pt")
8
  tokens = mdl.generate(**enc)
9
  response=text2text_tkn.batch_decode(tokens)