Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transferring Python projects to Google Colab

I have a python project where the main .py file imports other .py files and the main file is then run for different input arguments using a .sh file. Can anyone guide me how to transfer and run the entire project on Google Colab?

like image 986
redenzione11 Avatar asked Dec 23 '22 07:12

redenzione11


1 Answers

Commit your files to a git repo. In a new google colab file, run

!git clone <http url of your repo>

Then execute your program

!python main.py --foo bar

Alternatively, you could upload your project to google drive and then import the project from there.

like image 160
skaem Avatar answered Jan 01 '23 09:01

skaem