This model can convert the literal expression to figurative/metaphorical expression. Below is the usage of our model:


      from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
      
      tokenizer = AutoTokenizer.from_pretrained("figurative-nlp/t5-figurative-generation")
      model = AutoModelForSeq2SeqLM.from_pretrained("figurative-nlp/t5-figurative-generation")
      
      
      input_ids = tokenizer(
          "research is <m> very difficult </m> for me.", return_tensors="pt"
      ).input_ids  # Batch size 1
      outputs = model.generate(input_ids,beam_search = 5)
      result = tokenizer.decode(outputs[0], skip_special_tokens=True)
      #result : research is a tough nut to crack for me.



For example (the &lt;m&gt; and &lt;/m&gt; is the mark that inform the model which literal expression we want to convert it as  figurative expression):

   **Input**: as of a cloud that softly &lt;m&gt; covers &lt;/m&gt; the sun.
   
   **Output**: as of a cloud that softly drapes over the sun. 
   
   **Input**: that car coming around the corner &lt;m&gt; surprised me. &lt;/m&gt;
   
   **Output**: that car coming around the corner knocked my socks off.
   
   
 Note: the figurative language here includes metaphor, idiom and  simile. We don't guarantee that the results generated results are satisfactory to you. We are trying to improve the effect of the model.
{}
transformers pytorch t5 text2text-generation autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #t5 #text2text-generation #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

This model can convert the literal expression to figurative/metaphorical expression. Below is the usage of our model:


      from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
      
      tokenizer = AutoTokenizer.from_pretrained("figurative-nlp/t5-figurative-generation")
      model = AutoModelForSeq2SeqLM.from_pretrained("figurative-nlp/t5-figurative-generation")
      
      
      input_ids = tokenizer(
          "research is <m> very difficult </m> for me.", return_tensors="pt"
      ).input_ids  # Batch size 1
      outputs = model.generate(input_ids,beam_search = 5)
      result = URL(outputs[0], skip_special_tokens=True)
      #result : research is a tough nut to crack for me.



For example (the &lt;m&gt; and &lt;/m&gt; is the mark that inform the model which literal expression we want to convert it as  figurative expression):

   Input: as of a cloud that softly &lt;m&gt; covers &lt;/m&gt; the sun.
   
   Output: as of a cloud that softly drapes over the sun. 
   
   Input: that car coming around the corner &lt;m&gt; surprised me. &lt;/m&gt;
   
   Output: that car coming around the corner knocked my socks off.
   
   
 Note: the figurative language here includes metaphor, idiom and  simile. We don't guarantee that the results generated results are satisfactory to you. We are trying to improve the effect of the model.
# Batch size 1
      outputs = model.generate(input_ids,beam_search = 5)
      result = URL(outputs[0], skip_special_tokens=True)
      #result : research is a tough nut to crack for me.



For example (the &lt;m&gt; and &lt;/m&gt; is the mark that inform the model which literal expression we want to convert it as  figurative expression):

   Input: as of a cloud that softly &lt;m&gt; covers &lt;/m&gt; the sun.
   
   Output: as of a cloud that softly drapes over the sun. 
   
   Input: that car coming around the corner &lt;m&gt; surprised me. &lt;/m&gt;
   
   Output: that car coming around the corner knocked my socks off.
   
   
 Note: the figurative language here includes metaphor, idiom and  simile. We don't guarantee that the results generated results are satisfactory to you. We are trying to improve the effect of the model.
TAGS
#transformers #pytorch #t5 #text2text-generation #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 # Batch size 1
      outputs = model.generate(input_ids,beam_search = 5)
      result = URL(outputs[0], skip_special_tokens=True)
      #result : research is a tough nut to crack for me.



For example (the &lt;m&gt; and &lt;/m&gt; is the mark that inform the model which literal expression we want to convert it as  figurative expression):

   Input: as of a cloud that softly &lt;m&gt; covers &lt;/m&gt; the sun.
   
   Output: as of a cloud that softly drapes over the sun. 
   
   Input: that car coming around the corner &lt;m&gt; surprised me. &lt;/m&gt;
   
   Output: that car coming around the corner knocked my socks off.
   
   
 Note: the figurative language here includes metaphor, idiom and  simile. We don't guarantee that the results generated results are satisfactory to you. We are trying to improve the effect of the model.
passage: TAGS
#transformers #pytorch #t5 #text2text-generation #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
# Batch size 1
      outputs = model.generate(input_ids,beam_search = 5)
      result = URL(outputs[0], skip_special_tokens=True)
      #result : research is a tough nut to crack for me.



For example (the &lt;m&gt; and &lt;/m&gt; is the mark that inform the model which literal expression we want to convert it as  figurative expression):

   Input: as of a cloud that softly &lt;m&gt; covers &lt;/m&gt; the sun.
   
   Output: as of a cloud that softly drapes over the sun. 
   
   Input: that car coming around the corner &lt;m&gt; surprised me. &lt;/m&gt;
   
   Output: that car coming around the corner knocked my socks off.
   
   
 Note: the figurative language here includes metaphor, idiom and  simile. We don't guarantee that the results generated results are satisfactory to you. We are trying to improve the effect of the model.