def sentiment_file(gcs_uri):
 language_client = language.Client()
 document = language_client.document_from_url(gcs_uri)
 sentiment = document.analyze_sentiment()
 print 'Score: {}'.format(sentiment.score)
 print 'Magnitude: {}'.format(sentiment.magnitude)

def sentiment_file ( gcs_uri ) : language_client = language . Client ( ) document = language_client . document_from_url ( gcs_uri ) sentiment = document . analyze_sentiment ( ) print 'Score: {}' . format ( sentiment . score ) print 'Magnitude: {}' . format ( sentiment . magnitude )
detects sentiment in the file located in google cloud storage .