UnknownError: A valid user token is required

I am getting an error when I am running :
prompt = “Has math been invented or discovered?”
client.generate(prompt, max_new_tokens=256).generated_text

The error: A valid user token is required

Hi @AkhilR

Welcome to the community.

Would please share with me a screenshot of this error.

Best regards

This is the screenshot of the error

Hi @AkhilR

It looks like your session was expired.

Please, logout and log back in an try to run the cell codes again from the top.

I am getting a similar error on the Image captioning example. Here is a screenshot

I also logged back in after logging out but the error seems to persist. Any ideas of what could be causing this?