April 2024 Level 2 - What is expected for the last task of Analyze Speech & Language with Google API

Now solved - see reply

 

Cannot get the last task of this lab to validate: I keep getting the message "Please download the samples from the cloud storage URI given in lab and run the sentiment analysis on any files present in 'reviews' folder."

I have completed the tasks as follows:

Updated the Python code
Downloaded the files into the home directory
Unzipped the files
Executed the Python code against each file such as python sentiment_analysis.py reviews/bladerunner-pos.txt
Executed the Python code to an output against each file such as python sentiment_analysis.py reviews/bladerunner-pos.txt > bladerunner-pos-response.txt

And no matter what I do, it marks the task as incorrect and keeps coming back with that message: Please download the samples from the cloud storage URI given in lab and run the sentiment analysis on any files present in 'reviews' folder.!
I have done all of that! Executing the Python script gives the expected results (1 for each line of the input and then an aggregate score)

What more does it want???

This is blocking me from completing the Level 2 challenge.

I have already tried twice by ending lab and going in again, in case it was some random glitch. but get the same result.

4 2 559
2 REPLIES 2
Top Labels in this Space