upload files from kaggle to google drive

后端 未结 2 1146
清酒与你
清酒与你 2021-01-27 04:02

I am using kaggle to train a model and once training is done I would like upload the trained model to google drive as I cant figure out a way to download the model locally. I lo

2条回答
  •  孤街浪徒
    2021-01-27 04:57

    I was facing the same problem and was able download files from Kaggle to Colab then move to Google Drive. For example, if the current directory is /kaggle/working and the file to move is processed_file.zip then,

    From Kaggle

    from IPython.display import FileLink
    FileLink(r'processed_file.zip')
    

    This will generate a link,

    https://....kaggle.net/...../processed_file.zip
    

    From Colab

    !wget "https://....kaggle.net/...../processed_file.zip"
    

    Mount Google Drive

    from google.colab import drive
    drive.mount('/content/drive')
    

    Move to Google Drive

    !cp "/content/processed_file.zip" "/content/drive/My Drive/workspace"
    

提交回复
热议问题