I found the following example here.
@interact
def _(m=('matrix', identity_matrix(2))):
print m.eigenvalues()
Unlike the other examples I've tried, this one does not work when evaluated in SageMathCell. But it works well in a SageMathCloud Worksheet.
What am I supposed to do to produce such a matrix interact that works when I embed it in an html page?