Skip to content

Commit

Permalink
download function in python module #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Dafne van Kuppevelt committed Jan 11, 2021
1 parent 6701dd4 commit c58aaf3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
12 changes: 0 additions & 12 deletions setup.sh

This file was deleted.

16 changes: 16 additions & 0 deletions stroll/util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from pathlib import Path
import urllib.request


def download_srl_model(datapath):
datapath = Path(datapath)
fname_fasttext = datapath / 'fasttext.model.bin'
fname_model = datapath / 'srl.pt'
if not fname_fasttext.exists():
url = 'https://surfdrive.surf.nl/files/index.php/s/085yxFcRmn0osMw/download'
urllib.request.urlretrieve(url, fname_fasttext)

if not fname_model.exists():
url = 'https://surfdrive.surf.nl/files/index.php/s/kOgUm0oEpmx5HiZ/download'
urllib.request.urlretrieve(url, fname_model)
return fname_fasttext, fname_model

0 comments on commit c58aaf3

Please sign in to comment.