Answer a question

I am currently loading the images from my Google Drive.

But the issue is, those images are in my drive and when I share my colab notebook to others, they can't run it since it requires my authentication code to access the Drive images.

So I thought if I uploaded the data folder in a Github repository & made that repo as public will allow anyone to fetch the data (in my case images folder). Thus no authentication required to run the colab code.

I have no idea how to mount the directory to a Github repo as Google Drive.

from google.colab import drive
drive.mount('/content/drive/') # this will set my  google drive folder as the notebook directory.

Is it possible to do a similar mounting to a github repo?

Answers

You could clone the repository directly like this by running git in a code cell.

!git clone https://github.com/yourusername/yourpublicrepo.git

This will create a folder called yourpublicrepo.

Logo

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!

更多推荐