I don’t know how to fix this but you can at least salvage the text generated by the model by printing it out before the last line:
print(article_text)
And then manually log in to your wordpress site and create the post with the title, text, and feature image there.