keytotext
keytotext copied to clipboard
How to achieve text after training model
@gagan3012 I have run the codes in your Trainer.ipynb file
The command in your collab is this
keywords=["ski", "mountain", "sky"]
model.predict(keywords)
But I wouldlike to predict text for the same.
How do I do it after training as you did.
Hello, You also use the pipeline function from K2T.ipynb Let me know if this helps
Hi, Thankyou for your reply. But using the pipeline function gives me this error [image: image.png]
On Thu, 7 Oct 2021 at 01:20, Gagan Bhatia @.***> wrote:
Hello, You also use the pipeline function from K2T.ipynb https://github.com/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb Let me know if this helps
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gagan3012/keytotext/issues/76#issuecomment-937006008, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQWXH5RUUNYTBYGXZ4ERJELUFSSBTANCNFSM5FL57SYQ .
Sorry the image is not visible
The current problem while trying this is if you used GPU to train the model, you have to use it like so.
keywords=["ski", "mountain", "sky"]
model.predict(keywords, use_gpu=False)
TypeError: Trainer.init() got an unexpected keyword argument 'gpus' could you explain this error when running this line: model.train(train_df=train_df, test_df=eval_df, batch_size=4, max_epochs=10, use_gpu= False ,tpu_cores= 8)