mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Some updates regarding contributions
This commit is contained in:
parent
3004334d05
commit
821571e97f
@ -30,7 +30,7 @@
|
|||||||
pipeline_name: 'el_core_news_md'
|
pipeline_name: 'el_core_news_md'
|
||||||
version: '3.2.0'
|
version: '3.2.0'
|
||||||
compatible_service_versions:
|
compatible_service_versions:
|
||||||
- '0.1.0'
|
- '0.1.0'
|
||||||
- title: 'English'
|
- title: 'English'
|
||||||
description: 'English pipeline optimized for CPU. Components: tok2vec, tagger, parser, senter, ner, attribute_ruler, lemmatizer.'
|
description: 'English pipeline optimized for CPU. Components: tok2vec, tagger, parser, senter, ner, attribute_ruler, lemmatizer.'
|
||||||
url: 'https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.2.0/en_core_web_md-3.2.0.tar.gz'
|
url: 'https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.2.0/en_core_web_md-3.2.0.tar.gz'
|
||||||
@ -42,7 +42,6 @@
|
|||||||
version: '3.2.0'
|
version: '3.2.0'
|
||||||
compatible_service_versions:
|
compatible_service_versions:
|
||||||
- '0.1.0'
|
- '0.1.0'
|
||||||
- 'test'
|
|
||||||
- title: 'Spanish'
|
- title: 'Spanish'
|
||||||
description: 'Spanish pipeline optimized for CPU. Components: tok2vec, morphologizer, parser, senter, ner, attribute_ruler, lemmatizer.'
|
description: 'Spanish pipeline optimized for CPU. Components: tok2vec, morphologizer, parser, senter, ner, attribute_ruler, lemmatizer.'
|
||||||
url: 'https://github.com/explosion/spacy-models/releases/download/es_core_news_md-3.2.0/es_core_news_md-3.2.0.tar.gz'
|
url: 'https://github.com/explosion/spacy-models/releases/download/es_core_news_md-3.2.0/es_core_news_md-3.2.0.tar.gz'
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from enum import Enum, IntEnum
|
from enum import Enum, IntEnum
|
||||||
import re
|
|
||||||
from flask import current_app, url_for
|
from flask import current_app, url_for
|
||||||
from flask_hashids import HashidMixin
|
from flask_hashids import HashidMixin
|
||||||
from flask_login import UserMixin
|
from flask_login import UserMixin
|
||||||
@ -550,6 +549,10 @@ class TesseractOCRPipelineModel(FileMixin, HashidMixin, db.Model):
|
|||||||
str(self.id)
|
str(self.id)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def jsonpatch_path(self):
|
||||||
|
return f'{self.user.jsonpatch_path}/tesseract_ocr_pipeline_models/{self.hashid}'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self):
|
def url(self):
|
||||||
return url_for(
|
return url_for(
|
||||||
@ -557,6 +560,10 @@ class TesseractOCRPipelineModel(FileMixin, HashidMixin, db.Model):
|
|||||||
tesseract_ocr_pipeline_model_id=self.id
|
tesseract_ocr_pipeline_model_id=self.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def user_hashid(self):
|
||||||
|
return self.user.hashid
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def insert_defaults():
|
def insert_defaults():
|
||||||
nopaque_user = User.query.filter_by(username='nopaque').first()
|
nopaque_user = User.query.filter_by(username='nopaque').first()
|
||||||
@ -665,6 +672,10 @@ class SpaCyNLPPipelineModel(FileMixin, HashidMixin, db.Model):
|
|||||||
str(self.id)
|
str(self.id)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def jsonpatch_path(self):
|
||||||
|
return f'{self.user.jsonpatch_path}/spacy_nlp_pipeline_models/{self.hashid}'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self):
|
def url(self):
|
||||||
return url_for(
|
return url_for(
|
||||||
@ -672,6 +683,10 @@ class SpaCyNLPPipelineModel(FileMixin, HashidMixin, db.Model):
|
|||||||
spacy_nlp_pipeline_model_id=self.id
|
spacy_nlp_pipeline_model_id=self.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def user_hashid(self):
|
||||||
|
return self.user.hashid
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def insert_defaults():
|
def insert_defaults():
|
||||||
nopaque_user = User.query.filter_by(username='nopaque').first()
|
nopaque_user = User.query.filter_by(username='nopaque').first()
|
||||||
|
@ -123,12 +123,7 @@ class SpaCyNLPPipelineModelList extends RessourceList {
|
|||||||
let spaCyNLPPipelineModelId = spaCyNLPPipelineModelElement.dataset.id;
|
let spaCyNLPPipelineModelId = spaCyNLPPipelineModelElement.dataset.id;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'share-request': {
|
case 'share-request': {
|
||||||
let shared;
|
let shared = actionSwitchElement.querySelector('input').checked;
|
||||||
if (actionSwitchElement.querySelector('input').checked) {
|
|
||||||
shared = true;
|
|
||||||
} else {
|
|
||||||
shared = false;
|
|
||||||
}
|
|
||||||
Utils.shareSpaCyNLPPipelineModelRequest(this.userId, spaCyNLPPipelineModelId, shared);
|
Utils.shareSpaCyNLPPipelineModelRequest(this.userId, spaCyNLPPipelineModelId, shared);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -123,12 +123,7 @@ class TesseractOCRPipelineModelList extends RessourceList {
|
|||||||
let tesseractOCRPipelineModelId = tesseractOCRPipelineModelElement.dataset.id;
|
let tesseractOCRPipelineModelId = tesseractOCRPipelineModelElement.dataset.id;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'share-request': {
|
case 'share-request': {
|
||||||
let shared;
|
let shared = actionSwitchElement.querySelector('input').checked;
|
||||||
if (actionSwitchElement.querySelector('input').checked) {
|
|
||||||
shared = true;
|
|
||||||
} else {
|
|
||||||
shared = false;
|
|
||||||
}
|
|
||||||
Utils.shareTesseractOCRPipelineModelRequest(this.userId, tesseractOCRPipelineModelId, shared);
|
Utils.shareTesseractOCRPipelineModelRequest(this.userId, tesseractOCRPipelineModelId, shared);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user