Skip to content
Snippets Groups Projects
Commit 52267138 authored by Leszek Szymczak's avatar Leszek Szymczak
Browse files

Update plwn/download.py

parent 41c988a0
Branches
1 merge request!4Adding download option
Pipeline #1049 passed with stage
in 38 seconds
...@@ -15,6 +15,7 @@ config.read(config_path) ...@@ -15,6 +15,7 @@ config.read(config_path)
def get_available_models(): def get_available_models():
"""Returns available models."""
root = ET.parse(urlopen("https://minio.clarin-pl.eu/public")).getroot() root = ET.parse(urlopen("https://minio.clarin-pl.eu/public")).getroot()
available_models = [] available_models = []
for child in root.findall( for child in root.findall(
...@@ -30,10 +31,7 @@ def get_available_models(): ...@@ -30,10 +31,7 @@ def get_available_models():
def download(name="default_model"): def download(name="default_model"):
"""After called it downloads a specified database model. """After called it downloads a specified database model."""
Currently only one model available.
"""
models = get_available_models() models = get_available_models()
if name == "default_model": if name == "default_model":
url = config["DOWNLOAD"][name] url = config["DOWNLOAD"][name]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment