Lines 1-8 should work perfectly as is. However the problem lies in lines 9-12. For lines 9 and 10, you’ll need to delete the empty spaces so that it becomes torch==1.9.0 and torchvision==0.10.0.
As for installing from GitHub, you can refer to the following: