keytotext icon indicating copy to clipboard operation
keytotext copied to clipboard

How to achieve text after training model

Open shamine5 opened this issue 3 years ago • 5 comments

@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.

shamine5 avatar Oct 05 '21 15:10 shamine5

Hello, You also use the pipeline function from K2T.ipynb Let me know if this helps

gagan3012 avatar Oct 06 '21 19:10 gagan3012

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 .

shamine5 avatar Oct 07 '21 11:10 shamine5

Sorry the image is not visible

gagan3012 avatar Oct 07 '21 15:10 gagan3012

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)

deduble avatar Jul 06 '22 05:07 deduble

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)

prak8 avatar Jun 29 '23 00:06 prak8