My Jupyter Notebook has the following code to upload an image to Colab:
from google.colab import files
uploaded = files.upload()
I get prompted
You can use this function to plot ur images giving a path. using function is good thing to well structure your code.
from PIL import Image # Image manipulations
import matplotlib.pyplot as plt
%matplotlib inline
# This function is used more for debugging and showing results later. It plots the image into the notebook
def imshow(image_path):
# Open the image to show it in the first column of the plot
image = Image.open(image_path)
# Create the figure
fig = plt.figure(figsize=(50,5))
ax = fig.add_subplot(1, 1, 1)
# Plot the image in the first axe with it's category name
ax.axis('off')
ax.set_title(image_path)
ax.imshow(image)