PAIR-code/lit

Need help with text generation models!

aryan1107 opened this issue · 2 comments

I am very new to this tool. I am now successfully able to use classification models. However now I am getting stuck at text generation models. For example in the picture below there is Question and Context and based on that it generates text.

So in this case I haven't added label in my model class as it doesn't classify based on label. How do I show text generated field?

Screen Shot 2022-03-21 at 6 37 50 PM

As per https://github.com/PAIR-code/lit/wiki/components.md#seq2seq--generation, you can have a field in your model's output spec of type GeneratedText and return the generated string as the value of that field in your predict_minibatch function.

Thanks for your response I will try.