chapter_ids = {}
for element in resp.elements:
for chapter in chapters:
if element[“text”] == chapter and element[“type”] == “Title”:
chapter_ids[element[“element_id”]] = chapter
break
when I provide it with the given chapter name list ,this returns empty dict.
are you running codes locally in your system?
No, I am running it on learn.deeplearning.ai.
please share a screenshot. Also is the code from the deep learning.ai
you seem to be running the code on your local jupyter environment and I can see there is some key error. so if you are running codes locally, first make sure you have downloaded all the necessary files, then make sure your codes are running on the same version based on information provided in the course in a file name requirements.txt file, then another issue would be api keys as one would need to use their own api keys from the server codes were working upon.
no, actually I am running it on the deeplearning.ai, not locally.
can you post screenshot of the error down you are getting, that would give a clue why it’s isn’t working
Because, it can not find the ICE-HOCKEY, which is the chapter name, in the created dictionary. I tried to change the name to (ICE HOCKE) without the dash but, I think it get another title, because it fails also when comparing it.
@lesly.zerna can you please look if the dataset or the notebook needs update.