title: Word Cloud Project has no errors but won't show the word cloud
body: <p>I am doing the Coursera Python crash course and working on the final project.  I have no errors but the word cloud will not show.  This is relatively new to me, but I don't know why the word cloud isn't showing but no error is either.  Is there something I am missing to get the word cloud generated?  It is done in Jupyter, so the uploaded file happens beforehand.  That caused me problems when I stopped in the middle of the project and restarted later.  The upload did not stay, then I had to rerun that code to get the browse button to upload my file again.  Perhaps that is the problem?  Thank you!</p>
  <pre><code>def calculate_frequencies(file_contents):
      # Here is a list of punctuations and uninteresting words you can use to process your text
      punctuations = '''!()-[]{};:'&quot;\,&lt;&gt;./?@#$%^&amp;*_~'''
      uninteresting_words = [&quot;the&quot;, &quot;a&quot;, &quot;to&quot;, &quot;if&quot;, &quot;is&quot;, &quot;it&quot;, &quot;of&quot;, &quot;and&quot;, &quot;or&quot;, &quot;an&quot;, &quot;as&quot;, &quot;i&quot;, &quot;me&quot;, &quot;my&quot;, \
      &quot;we&quot;, &quot;our&quot;, &quot;ours&quot;, &quot;you&quot;, &quot;your&quot;, &quot;yours&quot;, &quot;he&quot;, &quot;she&quot;, &quot;him&quot;, &quot;his&quot;, &quot;her&quot;, &quot;hers&quot;, &quot;its&quot;, &quot;they&quot;, &quot;them&quot;, \
      &quot;their&quot;, &quot;what&quot;, &quot;which&quot;, &quot;who&quot;, &quot;whom&quot;, &quot;this&quot;, &quot;that&quot;, &quot;am&quot;, &quot;are&quot;, &quot;was&quot;, &quot;were&quot;, &quot;be&quot;, &quot;been&quot;, &quot;being&quot;, \
      &quot;have&quot;, &quot;has&quot;, &quot;had&quot;, &quot;do&quot;, &quot;does&quot;, &quot;did&quot;, &quot;but&quot;, &quot;at&quot;, &quot;by&quot;, &quot;with&quot;, &quot;from&quot;, &quot;here&quot;, &quot;when&quot;, &quot;where&quot;, &quot;how&quot;, \
      &quot;all&quot;, &quot;any&quot;, &quot;both&quot;, &quot;each&quot;, &quot;few&quot;, &quot;more&quot;, &quot;some&quot;, &quot;such&quot;, &quot;no&quot;, &quot;nor&quot;, &quot;too&quot;, &quot;very&quot;, &quot;can&quot;, &quot;will&quot;, &quot;just&quot;]
      
      # LEARNER CODE START HERE
      for i in file_contents:
          if i in punctuations:
              file_contents = file_contents.replace(i, '')
              
      word_list = file_contents.split()
      
      frequency_dict = {}
      for word in word_list:
          if word in uninteresting_words:
              pass
          elif word.lower() not in frequency_dict and word.isalpha():
              frequency_dict[word.lower()] = 1
          elif word in frequency_dict and word.isalpha():
              frequency_dict[word.lower()] += 1
      
      #wordcloud
      cloud = wordcloud.WordCloud()
      cloud.generate_from_frequencies(frequency_dict)
      return cloud.to_array()
  
  # Display your wordcloud image
  
      myimage = calculate_frequencies(file_contents)
      plt.imshow(myimage, interpolation = 'nearest')
      plt.axis('off')
      plt.show()
  </code></pre>