I’m trying to run the notebook for the exercise on Building a Q&A system, but I get a value error halfway down
ValueError: could not convert string to float: ‘message’
It happens when I run the code:
query = ['How to concat dataframes pandas']
query_embedding = embedding_model.get_embeddings(query)[0].values
because the query_embedding variable is just the string “message”. I’ve tried restarting the kernel but no luck. Has anyone had this problem before? Anyone know how to solve it?
The error states that it is something wrong with some kind of parse operation. It is like that the code is trying to convert the query to a float value.
Yes, it’s because the value of query_embedding is just the string “message” but the cosine_similarity method is expecting an embedding. So I assume something is going wrong with the embedding
Yes, I just do “Restart Kernel and Run All” to be sure and that’s the output I get. I was able to run the previous exercises without any issue but not this one for some reason
Just an update, I’ve gone back to one of the previous exercises that was working before and now it’s no longer working either. I now get an error when trying to connect to BigQuery, so it seems to be some sort of authentication issue with the API, right?
Thanks for the tips! I just tried that and it’s still not working unfortunately. Not sure if it’s related but I’m getting this little “error” badge at the top of the notebook next to the kernel after running the very first cell
So far it hasn’t been resolved, but I got another error this time. Not sure if this is helpful in debugging, but when i run the authenticate step i get this message. Do you think this is having an impact?
Also something else strange. When i click Restart Kernel and Clear Output, the cells are cleared. But when i refresh the page, the state is restored with the outputs. So I’m not sure if this restart and clear is actually working (I cleared my browser cache in between and it still didn’t work)
I think you have a serious browser or internet connection problem. Your browser is showing you a locally cached page instead of the live page from the server.