replace yhat with model(batch.text) in the make_dot call?
From what I remember make_dot takes a model instance with an input and returns an object which you can render into a .pdf.
The error you get says that the variable batch has no attribute text. Try printing batch.text and see what it returns?