Calling this agent generates an error on my HF Space but not in Google Colab:
ask the question
context = get_context_from_text()
st.write(“”)
question = question1
myanswer = agent.run(“Answer the question inquestion
using the context incontext
”, question=question, context=context)
st.write(f"Question: {question}“)
st.write(f” Answer: {myanswer}")
ValueError: Error 400: {‘error’: ‘Authorization header is correct, but the token seems invalid’}
I’m using the StarCoder model. The only difference between the Colab and HF versions is that I login to HF from Colab. Trying to login to HF from a Space generates an error. I have verified that both the ‘question’ and the ‘context’ are valid. Why am I getting an error on HF but not Colab? Thanks.