Closed Huy-Ngo closed 3 years ago
I will link those in the route /images manually then.
Reopen this issue.
I just learned that files in the ./static/
are served automatically by flask where .
is the same directory as app.py
. Please move the downloaded images folder to backend/static/isic/
and backend/static/kaggle/
@dinhanhx @casker2209
Like this:
If possible, please move the config file inside the project folder as well @dinhanhx
If possible, please move the config file inside the project folder as well @dinhanhx
The kaggle api token file's path is fixed and defined by module kaggle-api. Therefore it's not possible for me to move it into project folder.
OK then. Until this issue is resolved, I'll finish my PR as it it already has been.
I just learned that files in the
./static/
are served automatically by flask where.
is the same directory asapp.py
. Please move the downloaded images folder tobackend/static/isic/
andbackend/static/kaggle/
@dinhanhx @casker2209
According to my own kaggle doc download func, you can specify download path by yourself.
For example, I assume you have this block of code in app.py
,
from pathlib import Path
import kaggle
download_path = './static/kaggle/'
download_path = Path(download_path)
dataset_path = kaggle.download('dinhanhx/skin-cancer-mnist-ham10000', download_path)
scm = kaggle.SkinCancerMnist(dataset_path)
Oh I see.
Since two of our API sources (Kaggle and ISIC) require downloading to the backend, let's move those images to a common folder
backend/images/
for ease of hosting. They should be named in a way to avoid conflict (e.g. prefixing with ISIC- and Kaggle-). As far as I'm aware ISIC images are already prefixed, not sure about Kaggle.