Site icon Tutor Bin

Arizona State University Python Code Project

Arizona State University Python Code Project

Description

Colaboratory, or Colab for short, is a professional tool created by Google for writing and running Python code. Colab is a part of Google Drive, and allows you to save, edit, and run code notebooks online. Colab is used by professional data scientists, and is a bit more complex than the other tools we’ve looked at so far. Colab is powerful because it allows you web access to Google’s servers, and this makes it especially good for doing computationally intensive processes like training machine learning models. 

Prompt

Use the existing example code tutorial (linked below) to load your own txt data and generate your own AI text. Your text can be a poem, essay, speech, narrative, fiction – whatever you choose.

Instructions to complete this assignment if you missed the in-person class, or need a refresher:

First, go to Colab Research and sign in with your ASU google account. 

Watch three videos:

Google Colab’s Introduction to Colab (2 minutes, this gets a bit technical)

Introduction to Colab Interface (1.5 minutes)

Walk through this tutorial: use this link to access the tutorial (click “run in google colab”), and follow along with my tutorial video: (new!) TensorFlow AI Text Generation Demonstration.

Continue tweaking the settings starter words, epochs until you generate something you like.

  • Troubleshooting

This task is technical and specific, and can be difficult due to its precise nature. You may run into errors. Here are some of the most common errors:

  • You will get a pop-up that says “Google did not author this notebook.” That’s fine. Run anyway.

You did not run all the code blocks, in order, starting at the top. The easiest way to do this is to minimize the sections and then click the one play button remaining, which will run all the sections.

  • You did not upload your txt file, or did not change the file path name to the correct path.

Your txt file was too short, or formatted improperly. Make sure to switch your TextEdit program to open and use txt files by default. If you think this might be your problem, try this sample file: commencementspeechescompiled.txt Download commencementspeechescompiled.txt 

You pressed the code block while it was running (the error will say “KeyboardInterrupt”)

  • Hopefully, we can address all other errors during in-person class.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Exit mobile version