Write out file with google colab

前端 未结 2 809
时光取名叫无心
时光取名叫无心 2021-02-07 07:54

Was there a way to write out files with google colab? For example, if I use

import requests
r = requests.get(url)

Where will those files be sto

2条回答
  •  南旧
    南旧 (楼主)
    2021-02-07 08:40

    I found it is easier to first mount your Google drive to the non-persistent VM and then use os.chdir() to change your current working folder.

    After doing this, you can do the exactly same stuff as in local machine.

    I have a gist listing several ways to save and transfer files between Colab VM and Google drive, but I think mounting Google drive is the easiest approach.

    For more details, please refer to mount_your_google_drive.md in this gist https://gist.github.com/Joshua1989/dc7e60aa487430ea704a8cb3f2c5d6a6

提交回复
热议问题