Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PLWN_API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libraries
PLWN_API
Commits
52267138
Commit
52267138
authored
Jul 29, 2020
by
Leszek Szymczak
Browse files
Options
Downloads
Patches
Plain Diff
Update plwn/download.py
parent
41c988a0
Branches
Branches containing commit
No related tags found
1 merge request
!4
Adding download option
Pipeline
#1049
passed
Jul 29, 2020
Stage: check_style
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plwn/download.py
+2
-4
2 additions, 4 deletions
plwn/download.py
with
2 additions
and
4 deletions
plwn/download.py
+
2
−
4
View file @
52267138
...
@@ -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
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment