Hacker News new | ask | show | jobs
by desmap 2019 days ago
FWIW, I'm no fan of giving my email either, so I tried to load the transformer on my own system. Would you mind to put a bit more, eg an example, than just following three lines there?

  from transformers import AutoTokenizer, AutoModelWithLMHead
  tokenizer = AutoTokenizer.from_pretrained("mbien/recipenlg")
  model = AutoModelWithLMHead.from_pretrained("mbien/recipenlg")
FYI, I got this from running above lines:

  ...AutoModelWithLMHead is deprecated and will be removed in a future version...
FYI2, I just entered on your huggingface page "Get salt, apples and sugar and you get" and got "Get salt, apples and sugar and you get a soft, sticky mess. Then add water, add a lemon or lime and add a 1/8 teaspoon vanilla. Add a pinch of cinnamon and a dash of nutmeg. When you are ready", where is the recipe, what is this?? A bit more docs would be nice...
1 comments

Hi, after gathering the model and tokenizer, you can use the generic huggingface tutorial for text generation: https://huggingface.co/blog/how-to-generate

We use custom control tokens, so you have to provide the specific structure of the recipe, simply typing it in the huggingface prompt won't work. The details are available in our papers about the solution.

> in our papers

A link would be kind.